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

io.katharsis.resource.exception.ResourceException Maven / Gradle / Ivy

There is a newer version: 3.0.2
Show newest version
package io.katharsis.resource.exception;

import io.katharsis.errorhandling.ErrorData;
import io.katharsis.errorhandling.exception.KatharsisMappableException;
import io.katharsis.response.HttpStatus;

/**
 * General exception regarding resource building.
 */
public class ResourceException extends KatharsisMappableException {

    private static final String TITLE = "Resource error";

    public ResourceException(String message) {
        super(HttpStatus.INTERNAL_SERVER_ERROR_500, ErrorData.builder()
                .setTitle(TITLE)
                .setDetail(message)
                .setStatus(String.valueOf(HttpStatus.INTERNAL_SERVER_ERROR_500))
                .build());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy