Skip to content

Commit e86f131

Browse files
committed
Map INVALID_OPTIONS error to HTTP 400
1 parent 1410aff commit e86f131

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

driver/src/main/java/uniresolver/driver/util/HttpBindingServerUtil.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public static int httpStatusCodeForResult(Result result) {
4444
return HttpStatus.SC_NOT_FOUND;
4545
else if (ResolutionException.ERROR_INVALID_DID.equals(result.getErrorType()) || DereferencingException.ERROR_INVALID_DID_URL.equals(result.getErrorType()))
4646
return HttpStatus.SC_BAD_REQUEST;
47+
else if (ResolutionException.ERROR_INVALID_OPTIONS.equals(result.getErrorType()))
48+
return HttpStatus.SC_BAD_REQUEST;
4749
else if (ResolutionException.ERROR_REPRESENTATION_NOT_SUPPORTED.equals(result.getErrorType()) || DereferencingException.ERROR_REPRESENTATION_NOT_SUPPORTED.equals(result.getErrorType()))
4850
return HttpStatus.SC_NOT_ACCEPTABLE;
4951
else if (ResolutionException.ERROR_METHOD_NOT_SUPPORTED.equals(result.getErrorType()))

0 commit comments

Comments
 (0)