Skip to content

Replace 403 use to 422/429 to be aligned with CAMARA logic - #141

Open
bigludo7 wants to merge 2 commits into
mainfrom
fix123
Open

Replace 403 use to 422/429 to be aligned with CAMARA logic#141
bigludo7 wants to merge 2 commits into
mainfrom
fix123

Conversation

@bigludo7

Copy link
Copy Markdown
Collaborator

What type of PR is this?

Add one of the following kinds:

  • correction

What this PR does / why we need it:

Change http code:

ONE_TIME_PASSWORD_SMS.MAX_OTP_CODES_EXCEEDED was 403, now 429
ONE_TIME_PASSWORD_SMS.PHONE_NUMBER_NOT_ALLOWED was 403, now 422
ONE_TIME_PASSWORD_SMS.PHONE_NUMBER_BLOCKED was 403, now 422

Which issue(s) this PR fixes:

Fixes #123

Special notes for reviewers:

This is a breaking change modification

Changelog input

 release-note
Changed error code for following UC:
- When too many send-code requested code 429 ONE_TIME_PASSWORD_SMS.MAX_OTP_CODES_EXCEEDED  is send instead of 403
- When the send-code is performed for a number not allowed (like a landline number) 422 ONE_TIME_PASSWORD_SMS.PHONE_NUMBER_NOT_ALLOWED is send instead of 403
- When the send-code is performed for a number blocked 422 ONE_TIME_PASSWORD_SMS.BLOCKED is send instead of 403

Additional documentation

This section can be blank.

docs

bigludo7 added 2 commits July 21, 2026 11:39
Updated response references and error handling for SMS OTP validation for 403/422/429
Updated the feature file for one-time password SMS sendCode operation for 422/403/429 error handling scenarios.
@camara-validation

Copy link
Copy Markdown

CAMARA Validation — PASS (with warnings)

0 errors, 1 warnings, 1 hints | Profile: standard

View full results

@albertoramosmonagas

Copy link
Copy Markdown

This is necessary to create the snapshot? @camaraproject/otp-validation_codeowners

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use of 403 for business logic errors looks not compliant with HTTP and CAMARA

2 participants