Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make status endpoint to don't return 503 error code #254

Open
davidyuk opened this issue Dec 30, 2019 · 2 comments
Open

Make status endpoint to don't return 503 error code #254

davidyuk opened this issue Dec 30, 2019 · 2 comments

Comments

@davidyuk
Copy link
Member

davidyuk commented Dec 30, 2019

$ curl -D - https://mainnet.aeternal.io/middleware/status
HTTP/1.1 503 Service Unavailable
Date: Mon, 30 Dec 2019 06:56:34 GMT
Server: Rocket
content-type: application/json
Content-Length: 110
Access-Control-Allow-Origin: *
Connection: close

{"OK":false,"errors_last_500_blocks":0,"queue_length":47,"seconds_since_last_block":144304,"version":"0.13.0"}

Returning of the 503 error with the correct response looks confusing. We are using axios to get status, and it fails with an exception, but in this case, we can handle the response as usual. I think the status endpoint should return error code only if it can't return the response with the usual structure.

@johnsnewby
Copy link

We rely on this behaviour.

@davidyuk
Copy link
Member Author

Can you elaborate?

@davidyuk davidyuk reopened this Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants