Skip to content

Commit

Permalink
feat(api): error code not implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
heiytor committed Jan 8, 2025
1 parent 3f98228 commit 66e55a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/pkg/echo/handlers/pkg/converter/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ func FromErrServiceToHTTPStatus(code int) int {
return http.StatusForbidden
case services.ErrCodeNoContentChange:
return http.StatusNoContent
case services.ErrCodeNotImplemented:
return http.StatusNotImplemented
default:
return http.StatusInternalServerError
}
Expand Down
2 changes: 2 additions & 0 deletions api/services/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const (
ErrCodeNoContentChange
// ErrCodeCreated is the error code to be used when the resource was created, but the following operations failed.
ErrCodeCreated
// ErrCodeNotImplemented is the error code to be used when the resource is not yet implemented.
ErrCodeNotImplemented
)

// ErrDataNotFound structure should be used to add errors.Data to an error when the resource is not found.
Expand Down

0 comments on commit 66e55a7

Please sign in to comment.