camaraproject / CarrierBillingCheckOut

Repository to describe, develop, document and test the Carrier Billing Check Out API family
Apache License 2.0
10 stars 9 forks source link

Should the Generic401 code value be "UNAUTHENTICATED" instead of "UNAUTHORIZED" #173

Closed trehman-gsma closed 1 week ago

trehman-gsma commented 4 weeks ago

Problem description In the CAMARA_common.yaml, the 401 code is UNAUTHENTICATED:

            GENERIC_401_UNAUTHENTICATED:
              description: Request cannot be authenticated
              value:
                status: 401
                code: UNAUTHENTICATED
                message: Request not authenticated due to missing, invalid, or expired credentials.

However in carrier_billing.yaml and carrier_billing_refund.yaml, the code is UNAUTHORIZED:

          example:
            code: UNAUTHORIZED
            status: 401
            message: "Authorization failed: ..."

Should the value be aligned with CAMARA_common.yaml? I believe many other CAMARA APIs are also using UNAUTHENTICATED.

Expected behavior The code value to be changed in carrier_billing.yaml and carrier_billing_refund.yaml to align with CAMARA_common.yaml

hdamker commented 4 weeks ago

Just to note that also the API Design Guidelines are defining in chapter 6.1 Standardized use of CAMARA error responses the two values UNAUTHENTICATED and AUTHENTICATION_REQUIRED for the code field with the HTTP Status 401 (Unauthorized).

PedroDiez commented 3 weeks ago

Doing it as part of release 1.2 PR