Added error handling for not found objects

This commit is contained in:
2020-07-11 20:43:31 +02:00
parent 2f8d73c027
commit 4537c77652
4 changed files with 151 additions and 114 deletions

View File

@ -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;
}