-
Notifications
You must be signed in to change notification settings - Fork 28
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
Added 501 Not Supported error response #145
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -265,6 +265,16 @@ components: | |||||||
status: 501 | ||||||||
code: NOT_IMPLEMENTED | ||||||||
message: This functionality is not implemented yet | ||||||||
NotSupported: | ||||||||
description: Not Supported | ||||||||
content: | ||||||||
application/json: | ||||||||
schema: | ||||||||
$ref: "#/components/schemas/ErrorInfo" | ||||||||
example: | ||||||||
status: 501 | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be aligned with Issue#127 output (so far 422) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @PedroDiez
In this context, the client cannot "correct" the request as the server is not supporting this specific request. See 400 vs 500 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mhfoo please see my comment #127 (comment) regarding your same statement there. 422 with appropriate description is definitely more helpful for the client then 501. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think 501 is appropriate for functionality that has not yet been implemented, but will be (or, at least, could be) implemented at some point in the future, whereas a 4XX error should be returned for a request that will never make sense and will never be supported (such as requesting SIM Swap status for a landline). However desirable it is that all implementations support all possible functionality from the start, I do not think that will be the case. So I support using a 501 error in some circumstances where a phone number is not supported, but only if it will be supported at a later date. |
||||||||
code: NOT_SUPPORTED | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @PedroDiez |
||||||||
message: Service not supported for this phone number | ||||||||
AuthenticationRequired: | ||||||||
description: Authentication Required | ||||||||
content: | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PedroDiez
Suggest not to be specific to "phoneNumber", so this error can be reused.