0

Image showing the error encountered when 0x-api is tried to run locally

When tried to run a local version 0x-api, an internal server error is encountered. How do we overcome this to complete the local setup?

Error Message

{"level":"info","time":1634684466948,"pid":221370,"hostname":"aishu","req":{"id":"3dbbba61-dd55-4c03-a77c-7be5564e0b3a","method":"POST","url":"/orderbook/v1/order","query":{},"params":{},"headers":{"content-type":"application/json","user-agent":"PostmanRuntime/7.26.8","accept":"*/*","postman-token":"6d4888c5-f59e-4c1f-b5cc-6f3d6b9dc2ec","host":"localhost:3001","accept-encoding":"gzip, deflate, br","connection":"keep-alive","content-length":"910"},"remoteAddress":"::1","remotePort":38608,"body":{"makerToken":"0x39b8f771b76c59f1124dc4d4c9752799d3def99f","takerToken":"0x03a4132297a6956aadc3149214e79c2d98e8ad32","makerAmount":"10000","takerAmount":"20000","maker":"0x0000000000000000000000000000000000000000","taker":"0x0000000000000000000000000000000000000000","chainId":3,"verifyingContract":"0xdef1c0ded9bec7f1a1670819833240f027b25eff","takerTokenFeeAmount":"0","sender":"0x0000000000000000000000000000000000000000","feeRecipient":"0x0000000000000000000000000000000000000000","pool":"0x0000000000000000000000000000000000000000000000000000000000000000","salt":"846314","expiry":"0","signature":{"v":28,"r":"0xbc4bfc5fb14fcc580ce77055428c85bfe2fb9948682f327b0f88b335a97acfca","s":"0x73770af95619f7304cf0e6236e3bbb7236b26d4bee9d8e2e2b197376a139a35b","signatureType":3}}},"res":{"statusCode":500,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"53","etag":"W/\"35-q3ds3O+xttVHYK6psNZOcwB1doM\""},"statusMessage":"Internal Server Error"},"err":{"type":"Error","message":"failed with status code 500","stack":"Error: failed with status code 500\n    at ServerResponse.onResFinished (/home/akshay/Desktop/dextf/0x-api/node_modules/pino-http/logger.js:73:38)\n    at ServerResponse.emit (events.js:326:22)\n    at onFinish (_http_outgoing.js:735:10)\n    at onCorkedFinish (_stream_writable.js:673:5)\n    at afterWrite (_stream_writable.js:490:5)\n    at afterWriteTick (_stream_writable.js:477:10)\n    at processTicksAndRejections (internal/process/task_queues.js:83:21)"},"responseTime":18,"msg":"request errored"}
4
  • What value have you set for ETHEREUM_RPC_URL? 500 errors can be due to network timeouts from RPC providers.
    – Megan
    Commented Oct 18, 2021 at 13:26
  • I have used the Infura RPC. And I can confirm that the infura RPC end point is working. I have checked it in other application.
    – Akshay
    Commented Oct 18, 2021 at 15:05
  • Can you include the error message as text?
    – Ismael
    Commented Oct 19, 2021 at 5:19
  • I have added the error json in the body. Please check
    – Akshay
    Commented Oct 19, 2021 at 23:03

1 Answer 1

0

I checked back with the team and we are in the process of fixing the handling of this error: https://github.com/0xProject/0x-api/pull/774/files. Thanks for reporting!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.