com.github.nagyesta.lowkeyvault.model.common.ErrorModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lowkey-vault-app Show documentation
Show all versions of lowkey-vault-app Show documentation
Assembled application of Lowkey Vault.
package com.github.nagyesta.lowkeyvault.model.common;
import com.fasterxml.jackson.annotation.JsonProperty;
public record ErrorModel(@JsonProperty("error") ErrorMessage error) {
public ErrorModel(final ErrorMessage error) {
this.error = error;
}
public static ErrorModel fromException(final Exception e) {
return new ErrorModel(ErrorMessage.fromException(e));
}
}