wso2 / charon

123 stars 165 forks source link

Throw bad request exception for invalid json #375

Closed Avarjana closed 2 years ago

Avarjana commented 2 years ago

Purpose

Capture null values in the request and throw BadRequest 400 status instead of 500 ServerError.

Fixes https://github.com/wso2/product-is/issues/14477

jenkins-is-staging commented 2 years ago

PR builder started Link: https://github.com/wso2/product-is/actions/runs/2807557163

jenkins-is-staging commented 2 years ago

PR builder completed Link: https://github.com/wso2/product-is/actions/runs/2807557163 Status: failure

jenkins-is-staging commented 2 years ago

PR builder started Link: https://github.com/wso2/product-is/actions/runs/2815207246

jenkins-is-staging commented 2 years ago

PR builder completed Link: https://github.com/wso2/product-is/actions/runs/2815207246 Status: failure

piraveena commented 2 years ago

Failed with

1 expectation failed.
JSON path findAll{ it.presentationName == 'TestWorkflowAddUserForRestTask' }.size() doesn't match.
Expected: is <3>
  Actual: <2>

    at org.wso2.identity.integration.test.rest.api.user.approval.v1.UserMeApprovalTest.testListTasksWhenAvailable(UserMeApprovalTest.java:141)

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR] org.wso2.identity.integration.test.rest.api.user.approval.v1.UserMeApprovalTest.testListTasksWhenAvailable(org.wso2.identity.integration.test.rest.api.user.approval.v1.UserMeApprovalTest)
[ERROR]   Run 1: UserMeApprovalTest.testListTasksWhenAvailable:141 1 expectation failed.
JSON path findAll{ it.presentationName == 'TestWorkflowAddUserForRestTask' }.size() doesn't match.
Expected: is <3>
  Actual: <2>

[INFO]   Run 2: PASS

It is an intermittent test failure. Hence merging it