Skip to content

Commit

Permalink
fix: invalidArgument error
Browse files Browse the repository at this point in the history
  • Loading branch information
macgeargear committed Jan 11, 2024
1 parent d7505da commit 5b5d0c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/service/image/image.service.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ func (s *Service) AssignPet(in *dto.AssignPetRequest) (*dto.AssignPetResponse, *
Str("module", "assign pet").
Msg(st.Message())
switch st.Code() {
case codes.InvalidArgument:
return nil, &dto.ResponseErr{
StatusCode: http.StatusBadRequest,
Message: constant.InvalidArgumentMessage,
Data: nil,
}
case codes.NotFound:
return nil, &dto.ResponseErr{
StatusCode: http.StatusNotFound,
Expand Down

0 comments on commit 5b5d0c2

Please sign in to comment.