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

Calling API with invalid arg causes connection reset #20

Closed
dolfs opened this issue Mar 5, 2018 · 2 comments
Closed

Calling API with invalid arg causes connection reset #20

dolfs opened this issue Mar 5, 2018 · 2 comments
Labels
Milestone

Comments

@dolfs
Copy link
Contributor

dolfs commented Mar 5, 2018

I happened to be doing UI development using a proxy to a normally running moonfire instance. Due to coding error the API for recordings was called with start and end time set to null. Rather then producing an appropriate HTTP response (may be 500, or even 404) would have been expected.

Needless to say that the connection reset causes error messages that are unwanted, but it also means API calling code does not get its error path executed.

Sample output:

[HPM] Error occurred while trying to proxy request /api/cameras/1c844181-b807-4b80-83eb-579c8e194451/recordings?startTime90k=null&endTime90k=null&split90k=324000000&_=1520229643233 from localhost:3000 to http://192.168.10.232:8080 (ECONNRESET) (https://nodejs.org/api/errors.html#errors_common_system_errors)
@dolfs
Copy link
Contributor Author

dolfs commented Mar 5, 2018

This was against running code from commit 8de7e39 so it is possible this has already been fixed. No time at the moment to upgrade running version.

@scottlamb
Copy link
Owner

scottlamb commented Mar 5, 2018

It hasn't been fixed. At present, almost any problem will cause it to just drop the connection rather than return a proper HTTP error. It should at least log something to console / systemd journal that will likely tell you what went wrong.

@scottlamb scottlamb added this to the 1.0 milestone Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants