-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(SPV-846): move error structures into go-paymail
- Loading branch information
1 parent
e745b1a
commit d809aa4
Showing
6 changed files
with
63 additions
and
55 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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package errors | ||
|
||
// SPVError is extended error which holds information about http status and code that should be returned | ||
type SPVError struct { | ||
Code string | ||
Message string | ||
StatusCode int | ||
} | ||
|
||
// ResponseError is an error which will be returned in HTTP response | ||
type ResponseError struct { | ||
Code string `json:"code"` | ||
Message string `json:"message"` | ||
} | ||
|
||
const UnknownErrorCode = "error-unknown" | ||
|
||
// Error returns the error message string for SPVError, satisfying the error interface | ||
func (e SPVError) Error() string { | ||
return e.Message | ||
} |
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
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
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
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