Skip to content

Commit

Permalink
EST: map exceptions to proper HTTP responses
Browse files Browse the repository at this point in the history
Use PKIExceptionMapper to map the various web application exceptions
to the corresponding HTTP response types.

Part of: dogtagpki#3297
  • Loading branch information
frasertweedale committed Aug 25, 2022
1 parent cdeb304 commit 04e5ad3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base/est/src/main/java/org/dogtagpki/est/ESTApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

import org.dogtagpki.server.rest.PKIExceptionMapper;

@ApplicationPath("")
public class ESTApplication extends Application {

Expand All @@ -22,6 +24,9 @@ public class ESTApplication extends Application {
public ESTApplication() {
logger.info("Initializing ESTApplication");
classes.add(ESTFrontend.class);

// exception mapper
classes.add(PKIExceptionMapper.class);
}

@Override
Expand Down

0 comments on commit 04e5ad3

Please sign in to comment.