Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarvelle committed Mar 5, 2025
1 parent abe9995 commit 1eee11a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ trait TapirErrorHandling extends StrictLogging {
def invalidSearchContext: ErrorBody =
ErrorBody(INVALID_SEARCH_CONTEXT, INVALID_SEARCH_CONTEXT_DESCRIPTION, clock.now(), 400)
def methodNotAllowed: ErrorBody = ErrorBody(METHOD_NOT_ALLOWED, METHOD_NOT_ALLOWED_DESCRIPTION, clock.now(), 405)
def indexConflict: ErrorBody = ErrorBody(CONFLICT, INDEX_CONFLICT_DESCRIPTION, clock.now(), 409)
def indexConflict: ErrorBody = ErrorBody(CONFLICT, INDEX_CONFLICT_DESCRIPTION, clock.now(), 409)
def validationError(ve: ValidationException): ValidationErrorBody =
ValidationErrorBody(VALIDATION, VALIDATION_DESCRIPTION, clock.now(), messages = ve.errors.some, 400)
def errorBody(code: String, description: String, statusCode: Int): ErrorBody =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ trait ErrorHandling extends TapirErrorHandling {
case te: TaxonomyException => errorBody(TAXONOMY_FAILURE, te.getMessage, 500)
case v: ValidationException =>
ValidationErrorBody(VALIDATION, VALIDATION_DESCRIPTION, clock.now(), messages = v.errors.some, 400)
case ade: AccessDeniedException => forbiddenMsg(ade.getMessage)
case _: DocumentConflictException => indexConflict
case ade: AccessDeniedException => forbiddenMsg(ade.getMessage)
case _: DocumentConflictException => indexConflict
case NdlaSearchException(_, Some(rf), _, _)
if rf.error.rootCause
.exists(x => x.`type` == "search_context_missing_exception" || x.reason == "Cannot parse scroll id") =>
Expand Down

0 comments on commit 1eee11a

Please sign in to comment.