generated from 2martens/template-service
Added error handling for not found objects
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
package de.twomartens.oparlservice.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@Builder
|
||||
@Getter
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class ErrorObject {
|
||||
@Schema(description = "URL to type specification")
|
||||
private final String type = "https://schema.oparl.org/1.1/Error";
|
||||
|
||||
@Schema(description = "message for display to the user")
|
||||
private final String message;
|
||||
|
||||
@Schema(description = "additional information about the error")
|
||||
private final String debug;
|
||||
}
|
||||
Reference in New Issue
Block a user