All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openfact.services.OpenfactExceptionMapper Maven / Gradle / Ivy

The newest version!
package org.openfact.services;

import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;

@Provider
public class OpenfactExceptionMapper implements ExceptionMapper {

    @Override
    public Response toResponse(ModelErrorResponseException exception) {
        return ErrorResponse.error(exception.getMessage(), exception.getStatus());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy