Skip to content

Commit eaf6bec

Browse files
committed
Improved error on delete entitlement
1 parent 1b0d164 commit eaf6bec

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

obp-api/src/main/scala/code/api/util/ErrorMessages.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ object ErrorMessages {
921921
MeetingApiKeyNotConfigured -> 403,
922922
MeetingApiSecretNotConfigured -> 403,
923923
EntitlementNotFound -> 404,
924-
EntitlementCannotBeDeleted -> 404,
924+
EntitlementCannotBeDeleted -> 500,
925925
ConsentStatusIssue -> 401,
926926
ConsentDisabled -> 401,
927927
InternalServerError -> 500,

obp-api/src/main/scala/code/api/v2_0_0/APIMethods200.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1921,7 +1921,7 @@ trait APIMethods200 {
19211921
} map { unboxFull(_) }
19221922
_ <- Helper.booleanToFuture(UserDoesNotHaveEntitlement, cc=callContext) { entitlement.userId == userId }
19231923
deleted <- Future(Entitlement.entitlement.vend.deleteEntitlement(Some(entitlement))) map {
1924-
x => fullBoxOrException(x ~> APIFailureNewStyle(EntitlementCannotBeDeleted, 404, callContext.map(_.toLight)))
1924+
x => fullBoxOrException(x ~> APIFailureNewStyle(EntitlementCannotBeDeleted, 500, callContext.map(_.toLight)))
19251925
} map { unboxFull(_) }
19261926
} yield (deleted, HttpCode.`204`(cc.callContext))
19271927
}

0 commit comments

Comments
 (0)