Skip to content

Commit

Permalink
Replaced detailed message for accessdenied error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jillian Inapurapu authored and Jillian Inapurapu committed Dec 6, 2023
1 parent 5aece7f commit 5dca280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion restapi/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ func ErrorWithContext(ctx context.Context, err ...interface{}) *CodedAPIError {
errorMessage = ErrInvalidLogin.Error()
}
if strings.Contains(strings.ToLower(err1.Error()), ErrAccessDenied.Error()) {
detailedMessage = ""
errorCode = 403
errorMessage = err1.Error()
}
Expand All @@ -124,6 +123,7 @@ func ErrorWithContext(ctx context.Context, err ...interface{}) *CodedAPIError {
errorMessage = err1.Error()
}
if strings.Contains(err1.Error(), ErrLoginNotAllowed.Error()) {
detailedMessage = ""
errorCode = 400
errorMessage = ErrLoginNotAllowed.Error()
}
Expand Down

0 comments on commit 5dca280

Please sign in to comment.