refactor errors #214
Loading…
Reference in a new issue
No description provided.
Delete branch "errors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Even though this is WIP, a review of the existing commits would be welcome. I had a second look at them but especially the latest one is quite large.
5736a5cc41
tofb76843c19
This also improves the generated OpenAPI specification insofar as it now only generates the errors that can really happen on an endpoint: Not showing the 418 error on all endpoints, not showing authentication errors on endpoints that do not require authentication, etc.
I also noticed that although there was the possibility to specify a specialized error return value, this was not being properly understood while generating the documentation and instead documenting all those errors as 400 errors. This has of course also been fixed.
WIP: refactor errorsto refactor errorsAs far as I can tell, everything looks good. Seems to be also working on my local dev environment.
@ -34,1 +22,3 @@
},
// FIXME: refactor to remove both of these errors?
// the password should not be passed as it is not compatible with using OAuth
errors: ['ACCESS_DENIED', 'INTERNAL_ERROR'],
What's the reasoning behind replacing "Unavailable email address" with
INTERNAL_ERROR
?Probably not a great idea to give away users email addresses, so didn't want to make that too obvious. IMHO we should think about removing it all together.