fix: better error messages for 422

This commit is contained in:
James Houlahan
2020-04-21 13:13:02 +02:00
parent 68d1442a8f
commit 76b480298a
3 changed files with 15 additions and 5 deletions

View File

@ -56,10 +56,16 @@ var (
ErrInvalidToken = errors.New("refresh token invalid")
ErrAPINotReachable = errors.New("cannot reach the server")
ErrUpgradeApplication = errors.New("application upgrade required")
ErrNoSuchAPIID = errors.New("no such API ID")
)
type ErrUnprocessableEntity struct {
error
}
func (err *ErrUnprocessableEntity) Error() string {
return err.error.Error()
}
type ErrUnauthorized struct {
error
}