docfix/Improve error messages

This commit is contained in:
Marko Milić 2025-05-08 11:58:21 +02:00
parent d38a8153e1
commit 0fefc6f698
2 changed files with 3 additions and 2 deletions

View File

@ -268,6 +268,7 @@ object ErrorMessages {
val OneTimePasswordExpired = "OBP-20211: The One Time Password (OTP) has expired. "
val Oauth2IsNotRecognized = "OBP-20214: OAuth2 Access Token is not recognised at this instance."
val Oauth2ValidateAccessTokenError = "OBP-20215: There was a problem validating the OAuth2 access token. "
val OneTimePasswordInvalid = "OBP-20216: The One Time Password (OTP) is invalid. "
val AuthorizationHeaderAmbiguity = "OBP-20250: Request headers used for authorization are ambiguous. "
val MissingMandatoryBerlinGroupHeaders= "OBP-20251: Missing mandatory request headers. "

View File

@ -393,7 +393,7 @@ class BerlinGroupConsent extends MdcLoggable with RestHelper with APIMethods510
s"$redirectUriValue?CONSENT_ID=${consentId}"
)
case _ =>
S.error("Cannot bet consent")
S.error(ErrorMessages.ConsentNotFound)
}
}
@ -411,7 +411,7 @@ class BerlinGroupConsent extends MdcLoggable with RestHelper with APIMethods510
s"/confirm-bg-consent-request-redirect-uri?CONSENT_ID=${consentId}"
)
case _ =>
S.error("Wrong OTP value")
S.error(ErrorMessages.OneTimePasswordInvalid)
}
}