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

io.dropwizard.vavr.jersey.EmptyValueExceptionMapper Maven / Gradle / Ivy

package io.dropwizard.vavr.jersey;

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

/**
 * The default response when an empty {@link io.vavr.Value} is returned, is to respond with
 * a 404 (Not Found) response.
 */
public class EmptyValueExceptionMapper implements ExceptionMapper {
    @Override
    public Response toResponse(EmptyValueException exception) {
        return Response.status(Response.Status.NOT_FOUND).build();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy