Skip to content

Commit

Permalink
APPNG-2478
Browse files Browse the repository at this point in the history
  • Loading branch information
madness-inc committed Apr 24, 2023
1 parent 714a618 commit 1be0eb8
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 @@ -134,7 +134,7 @@ public ResponseEntity<Action> getAction(
}

Action action = getAction(application, initialRequest, initialAction, env, null, false, null);
return new ResponseEntity<Action>(action, hasErrors() ? HttpStatus.UNPROCESSABLE_ENTITY : HttpStatus.OK);
return new ResponseEntity<Action>(action, hasErrors() ? HttpStatus.UNPROCESSABLE_ENTITY : HttpStatus.valueOf(httpServletResponse.getStatus()));
}

// @formatter:off
Expand Down Expand Up @@ -179,7 +179,7 @@ public ResponseEntity<Action> performActionMultiPart(

Action action = getAction(application, request, processedAction, environment, null, false, null);
ResponseEntity<Action> responseEntity = new ResponseEntity<>(action,
hasErrors() ? HttpStatus.UNPROCESSABLE_ENTITY : HttpStatus.OK);
hasErrors() ? HttpStatus.UNPROCESSABLE_ENTITY : HttpStatus.valueOf(servletResp.getStatus()));
errors = false;
return responseEntity;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public ResponseEntity<Datasource> getDataSource(

Datasource datasource = transformDataSource(environment, httpServletResponse, applicationProvider,
processedDataSource);
return new ResponseEntity<Datasource>(datasource, HttpStatus.OK);
return new ResponseEntity<Datasource>(datasource, HttpStatus.valueOf(httpServletResponse.getStatus()));
}

protected Datasource transformDataSource(Environment environment, HttpServletResponse httpServletResponse,
Expand Down

0 comments on commit 1be0eb8

Please sign in to comment.