In Chapter 7, you learned how to create complex responses using the Response and ResponseBuilder classes. You also learned how to map thrown exceptions to a Response using a javax.ws.rs.ext.ExceptionMapper. Since most of our examples use a Response object in one way or another, this chapter focuses only on writing an ExceptionMapper.