Skip to content

Enhancements and Alignments in Errors #321

@PedroDiez

Description

@PedroDiez

Problem description
Two enhancements are proposed inder this issue:

  • Normalize mandatory errors that are common to every CAMARA API.
  • Define specific Errors for phoneNumber concept in the same fashion as done for device in MetaRelease Fall 24 for device error responses

Possible evolution

  1. Normalize Mandatory Error status
  • Add within section 6.1 Standardized use of CAMARA error responses the following information:

Mandatory Errors to be documented in CAMARA API Spec YAML are the following:

Error status 401
Error status 403
Error status 429 TOO_MANY_REQUESTS (For rate limit control)

NOTE: The rest of Error status defined in section 6.1. will apply depending on specific considerations within the given WG.

  1. Define specific Errors for phoneNumber concept

Add a new section 6.3 Error Responses - phoneNumber to detail error scenarios for phoneNumber

Case # Description Error status Error code Message example
0 The request body does not comply with the schema 400 INVALID_ARGUMENT Request body does not comply with the schema.
1 The phoneNumber provided is not supported by the implementation 422 UNSUPPORTED_PHONE_NUMBER phoneNumber is required.
2 phoneNumber is not found. 404 PHONE_NUMBER_NOT_FOUND phoneNumber not found.
3 Invalid access token context 403 INVALID_TOKEN_CONTEXT phoneNumber is not consistent with access token.
4 Service not applicable to the phoneNumber 422 PHONE_NUMBER_NOT_APPLICABLE The service is not available for the provided phoneNumber.
5 The phone number is not included in the request and the phone number information cannot be derived from the 3-legged access token 422 UNIDENTIFIABLE_PHONE_NUMBER The phoneNumber cannot be identified.
6 The phoneNumber is unnecesarily included in a 3-legged scenario where the subscription is identified from the 3-legged access token 422 UNNECESSARY_PHONE_NUMBER The phoneNumber is unnecesarily provided

NOTE: New exceptions would be added to CAMARA_common.yaml for reference

Alternative solution

Additional context

There are CAMARA APIs where phoneNumber represents the end's user subscription (e.g SIM-SWAP, Number Verification, Carrier Billing, KYC family,...). Therefore having specific errors related to the concept of phoneNumber is the natural way to address error scenarios in a fully semantic and user-friendly way

Proposed as a child issue of #306

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions