-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51904ec
commit b1cc712
Showing
2 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
package response | ||
|
||
var ( | ||
BadRequestMsg = map[string][]string{"__error__": {"bad request"}} | ||
// BadAuth signalizes lack of token or other authorization data | ||
NotAuthorizedMsg = map[string][]string{"__error__": {"authorization error"}} | ||
// InternalError server side error | ||
InternalErrMsg = map[string][]string{"__error__": {"internal/server error"}} | ||
// MsgBadRequest used to indicate error in incoming data | ||
MsgBadRequest = map[string][]string{"__error__": {"bad request"}} | ||
// MsgNotFound typically used when element haven't been found | ||
MsgNotFound = map[string][]string{"__error__": {"not found"}} | ||
// MsgUnauthorized signalizes lack of token or other authorization data | ||
MsgUnauthorized = map[string][]string{"__error__": {"authorization error"}} | ||
// MsgForbidden used when user does not have any permissions to perform action | ||
MsgForbidden = map[string][]string{"__error__": {"forbidden error"}} | ||
// MsgInternalErr server side error | ||
MsgInternalErr = map[string][]string{"__error__": {"internal/server error"}} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters