mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 16:56:56 +00:00
bugfix/Error of Mandatory headers of Berlin Group is 400
This commit is contained in:
parent
3e66f87d7a
commit
cbba66298c
@ -1,8 +1,9 @@
|
||||
package code.api.util
|
||||
|
||||
import code.api.RequestHeader
|
||||
import code.api.APIFailureNewStyle
|
||||
import code.api.util.APIUtil.fullBoxOrException
|
||||
import com.openbankproject.commons.model.User
|
||||
import net.liftweb.common.{Box, Empty, Failure}
|
||||
import net.liftweb.common.{Box, Empty}
|
||||
import net.liftweb.http.provider.HTTPParam
|
||||
|
||||
object BerlinGroupCheck {
|
||||
@ -27,7 +28,7 @@ object BerlinGroupCheck {
|
||||
if (missingHeaders.isEmpty) {
|
||||
forwardResult // All mandatory headers are present
|
||||
} else {
|
||||
(Failure(s"Missing mandatory headers: ${missingHeaders.mkString(", ")}"), forwardResult._2)
|
||||
(fullBoxOrException(Empty ~> APIFailureNewStyle(s"${ErrorMessages.MissingMandatoryBerlinGroupHeaders}(${missingHeaders.mkString(", ")})", 400, forwardResult._2.map(_.toLight))), forwardResult._2)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -266,6 +266,7 @@ object ErrorMessages {
|
||||
val Oauth2ValidateAccessTokenError = "OBP-20215: There was a problem validating the OAuth2 access token. "
|
||||
|
||||
val AuthorizationHeaderAmbiguity = "OBP-20250: Request headers used for authorization are ambiguous. "
|
||||
val MissingMandatoryBerlinGroupHeaders= "OBP-20251: Missing mandatory request headers. "
|
||||
|
||||
// X.509
|
||||
val X509GeneralError = "OBP-20300: PEM Encoded Certificate issue."
|
||||
|
||||
Loading…
Reference in New Issue
Block a user