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

io.narayana.lra.client.internal.proxy.InvalidStateExceptionMapper Maven / Gradle / Ivy

There is a newer version: 7.0.2.Final
Show newest version
/*
   Copyright The Narayana Authors
   SPDX-License-Identifier: Apache-2.0
 */

package io.narayana.lra.client.internal.proxy;

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

public class InvalidStateExceptionMapper implements ExceptionMapper {
    @Override
    public Response toResponse(InvalidLRAStateException exception) {
        return Response.status(Response.Status.PRECONDITION_FAILED)
                .entity(exception.getMessage()).build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy