Improvement of error responses from the API
Closed this issue · 2 comments
tobiasehlert commented
We need to respond with proper error codes and messages.
Example scenarios:
- 404 if the resource is not found (e.g. faulty character name)
- 429 if the request is being throttled (tibia code is actually 403)
- 503 if there was some upstream issue
- and also something when tibia is having maintenance.
Section that needs to be rewritten/enhanced:
tibiadata-api-go/src/webserver.go
Lines 679 to 691 in ce26e50
This should then also be added to the documentation annotation, so that docs get automatic update too.
tobiasehlert commented
Separate branch (feature-error-handling) created for this.
tobiasehlert commented
error handling implemented by #86, closing issue.