-
Notifications
You must be signed in to change notification settings - Fork 17
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
Document result codes and possible content if track upload fails #155
Comments
Digging a little my result is: currently we're returning Code 400 (InvalidUsage) for duplicate tracks. We're not overly specific in what we return yet. This is the implementation of portal/api/obs/api/routes/tracks.py Lines 90 to 129 in ee6163b
|
In principle, any code outside the 200s range is an error. The shape of the error response body doesn't make me happy yet so please try not to use it ;) The response is a JSON encoded track object, so it has its own slug in there and you can build the URL yourself. Isn't that enough? |
Might be a link to the source code would be enough documentation :)
With openbikesensor/OpenBikeSensorFirmware#193 we started the idea to return the link to the new uploaded track as body of the response. This can allow easy navigation to the track after upload.
Today there are more none technical errors detected on the portal which deserve a error code like
409
if the track is already uploaded etc. Might be this is already the case, I did not look into the code ;).The text was updated successfully, but these errors were encountered: