Added authorization
This commit is contained in:
parent
c3c3d65d32
commit
b96dd39795
50 changed files with 685 additions and 410 deletions
|
|
@ -16,6 +16,8 @@ func HandleError(err error) responses.ErrorResponse {
|
|||
|
||||
if errors.Is(&ie.ValidationError{}, err) {
|
||||
errorCode = http.StatusBadRequest
|
||||
} else if errors.Is(&ie.ReadFileError{}, err) {
|
||||
errorCode = http.StatusInternalServerError
|
||||
} else if errors.Is(&ie.NotFoundError{}, err) {
|
||||
errorCode = http.StatusNotFound
|
||||
} else if errors.Is(&ie.AlreadyExistsError{}, err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue