Skip to content

Commit

Permalink
Update APIErrorExceptionMapper to generate response for org.wso2.carb…
Browse files Browse the repository at this point in the history
…on.identity.api.user.onboard.common.error.APIError
  • Loading branch information
Lakshan-Banneheke committed Feb 9, 2024
1 parent 72fa339 commit ca19285
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,9 @@
<groupId>org.wso2.carbon.identity.user.api</groupId>
<artifactId>org.wso2.carbon.identity.api.user.common</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.user.api</groupId>
<artifactId>org.wso2.carbon.identity.api.user.onboard.common</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ public Response toResponse(WebApplicationException e) {

return buildResponse(response, status);

} else if (e instanceof org.wso2.carbon.identity.api.user.onboard.common.error.APIError) {
Object response = ((org.wso2.carbon.identity.api.user.onboard.common.error.APIError) e).getResponseEntity();
Response.Status status =
getHttpsStatusCode(((org.wso2.carbon.identity.api.user.onboard.common.error.APIError)
e).getCode(), ((org.wso2.carbon.identity.api.user.onboard.common.error.APIError) e).getStatus());

return buildResponse(response, status);

}
return e.getResponse();
}
Expand Down
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@
<artifactId>org.wso2.carbon.identity.api.user.common</artifactId>
<version>${identity.user.api.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.user.api</groupId>
<artifactId>org.wso2.carbon.identity.api.user.onboard.common</artifactId>
<version>${identity.user.api.version}</version>
</dependency>


<!-- Server REST API Dependencies. -->
Expand Down Expand Up @@ -220,7 +225,7 @@
<commons-lang3.version>3.4</commons-lang3.version>
<maven.buildnumber.plugin.version>1.4</maven.buildnumber.plugin.version>
<org.apache.felix.annotations.version>1.2.4</org.apache.felix.annotations.version>
<identity.user.api.version>1.2.3</identity.user.api.version>
<identity.user.api.version>1.3.34</identity.user.api.version>
<identity.server.api.version>1.1.10</identity.server.api.version>
<carbon.p2.plugin.version>1.5.3</carbon.p2.plugin.version>
<maven.findbugsplugin.version>3.0.4</maven.findbugsplugin.version>
Expand Down

0 comments on commit ca19285

Please sign in to comment.