-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add 400 OUT_OF_RANGE error when the maxAge is above 2400 #189
base: main
Are you sure you want to change the base?
Conversation
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
@bigludo7 I edited the title and the description of the PR, as the content is a 400, not a 403 error response. |
value: | ||
status: 400 | ||
code: OUT_OF_RANGE | ||
message: Client specified an invalid range. |
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.
This is a very generic definition. A client which will receive such error code will have to guess what exactly value is out of the range and what this range is. The error must explicitly say this.
If we introduce this error for maxAge > 24000 only - we can describe this in he API description. So, a client knows what the error is really about.
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.
As we have very few attribute in this check request (only the maxAge in 3-legs, maxAge & phoneNumber in the 2-legs scenario) I have no problem to custom our message to SIM_SWAP.MAX_AGE_OUT_OF_RANGE.
@gregory1g @fernandopradocabrillo @QaunainM work for you?
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.
I prefer to stick with the generic one from commonalities artifact. The message is a free text field that can be customized by the implementation. If you feel that it is something critical we can use a message like: "Client specified a value of maxAge outside the defined range"
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.
@fernandopradocabrillo Yes make sense - I've forget our message capability - This seems to me a better approach.
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.
To have in mind for this PR: #184 (reply in thread)
What type of PR is this?
Add one of the following kinds:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #187
Special notes for reviewers:
Changelog input
Additional documentation
This section can be blank.