diff --git a/app.js b/app.js index 4599b06..ee0d43d 100644 --- a/app.js +++ b/app.js @@ -363,6 +363,7 @@ router.get('/(.*)', withNear, withContractId, withAccountId, async ctx => { if (e.message.includes('CompilationError(CodeDoesNotExist') || e.message.includes('MethodResolveError(MethodNotFound') || e.message.startsWith('codeNotFound') + || e.message.match(/Account ID .* is invalid/) // NOTE: Looks like NEAR RPC returns this for non-existent contract code || e.message.includes('method web4_get not found')) { if (i == 0) { diff --git a/test/e2e.sh b/test/e2e.sh index 362dba7..0a790c6 100755 --- a/test/e2e.sh +++ b/test/e2e.sh @@ -10,7 +10,7 @@ trap "pkill -SIGINT -P $$" EXIT # Wait for server to start sleep 1 -# Use curl for basic JSON-RPC tests +# Use curl for basic tests curl --fail-with-body http://localhost:3000/ -H 'Host: web4.near.page' curl --fail-with-body http://localhost:3000/ -H 'Host: vlad.near.page' curl --fail-with-body http://localhost:3000/ -H 'Host: lands.near.page'