docs: standardise error types and error codes (#432)

This commit is contained in:
bernard-eugine
2023-01-31 16:46:51 +05:30
committed by GitHub
parent 010aff5f4c
commit 3dfd548cb8
4 changed files with 88 additions and 90 deletions

View File

@ -325,7 +325,7 @@ impl From<errors::ApiErrorResponse> for StripeErrorCode {
errors::ApiErrorResponse::Unauthorized
| errors::ApiErrorResponse::InvalidJwtToken
| errors::ApiErrorResponse::GenericUnauthorized { .. }
| errors::ApiErrorResponse::InvalidEphermeralKey => Self::Unauthorized,
| errors::ApiErrorResponse::InvalidEphemeralKey => Self::Unauthorized,
errors::ApiErrorResponse::InvalidRequestUrl
| errors::ApiErrorResponse::InvalidHttpMethod => Self::InvalidRequestUrl,
errors::ApiErrorResponse::MissingRequiredField { field_name } => {