mirror of
https://github.com/kataras/iris.git
synced 2026-01-05 19:27:05 +00:00
improvements to the x/client package
This commit is contained in:
@@ -73,7 +73,8 @@ func DecodeError(err error, destPtr interface{}) error {
|
||||
|
||||
// GetErrorCode reads an error, which should be a type of APIError,
|
||||
// and returns its status code.
|
||||
// If the given "err" is nil or is not an APIError it returns 200, acting as we have no error.
|
||||
// If the given "err" is nil or is not an APIError it returns 200,
|
||||
// acting as we have no error.
|
||||
func GetErrorCode(err error) int {
|
||||
apiErr, ok := GetError(err)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user