Skip to content

Commit

Permalink
fix: detect check constraint errors properly (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop authored Nov 11, 2022
1 parent 4282ea6 commit 7381b3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metadata/hasura.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func parseGraphqlError(err error) *controller.APIError {
return controller.InternalServerError(err)
}
switch code {
case "access-denied", "validation-failed":
case "access-denied", "validation-failed", "permission-error":
return controller.ForbiddenError(ghErr, "you are not authorized")
case "data-exception", "constraint-violation":
return controller.BadDataError(err, ghErr.Error())
Expand Down

0 comments on commit 7381b3c

Please sign in to comment.