package io.dropwizard.jersey.errors;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class ErrorMessage {
    private final int code;
    private final String message;
    private final String details;

    public ErrorMessage(String message) {
        this(500, message);
    }

    public ErrorMessage(int code, String message) {
        this(code, message, null);
    }

    @JsonCreator
    public ErrorMessage(@JsonProperty("code") int code, @JsonProperty("message") String message,
                        @JsonProperty("details") String details) {
        this.code = code;
        this.message = message;
        this.details = details;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public String getDetails() {
        return details;
    }
}

@@ -801,32 +801,58 @@
 details;%0A    %7D%0A%0A
+    @JsonProperty(%22code%22)%0A
     public Integ
@@ -886,32 +886,61 @@
 rn code;%0A    %7D%0A%0A
+    @JsonProperty(%22message%22)%0A
     public Strin
@@ -979,32 +979,61 @@
 message;%0A    %7D%0A%0A
+    @JsonProperty(%22details%22)%0A
     public Strin

Add @JsonProperty annotations to ErrorMessage