Skip to content

Commit

Permalink
Improve dcr content type error
Browse files Browse the repository at this point in the history
  • Loading branch information
imesh94 committed Jul 17, 2024
1 parent 1149fbf commit 1f81475
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public class OpenBankingErrorCodes {
public static final String MISSING_HEADER_PARAM_CLIENT_ID = "200015";
public static final String ERROR_IN_EVENT_POLLING_REQUEST = "200016";

// Error titles
public static final String UNSUPPORTED_MEDIA_TYPE = "Unsupported Media Type";

public static final String REGISTRATION_INTERNAL_ERROR = "Error occurred while registering application";
public static final String REGISTATION_DELETE_ERROR = "Error occurred while deleting application";
public static final String REGISTRATION_UPDATE_ERROR = "Error occurred while updating application";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ public String getContextProperty(String key) {
}

private void handleContentTypeErrors(String errorCode, String errorMessage) {
OpenBankingExecutorError error = new OpenBankingExecutorError(errorCode, errorMessage, errorMessage,
OpenBankingExecutorError error = new OpenBankingExecutorError(errorCode,
OpenBankingErrorCodes.UNSUPPORTED_MEDIA_TYPE, errorMessage,
OpenBankingErrorCodes.UNSUPPORTED_MEDIA_TYPE_CODE);

this.isError = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ public String getContextProperty(String key) {
}

private void handleContentTypeErrors(String errorCode, String errorMessage) {
OpenBankingExecutorError error = new OpenBankingExecutorError(errorCode, errorMessage, errorMessage,
OpenBankingExecutorError error = new OpenBankingExecutorError(errorCode,
OpenBankingErrorCodes.UNSUPPORTED_MEDIA_TYPE, errorMessage,
OpenBankingErrorCodes.UNSUPPORTED_MEDIA_TYPE_CODE);

this.isError = true;
Expand Down

0 comments on commit 1f81475

Please sign in to comment.