Make ErrorResponse
implement Error
This allows an ErrorResponse to be used directly as an error type. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
a43a2ed746
commit
6ddd43b589
1 changed files with 6 additions and 0 deletions
6
api/types/error_response_ext.go
Normal file
6
api/types/error_response_ext.go
Normal file
|
@ -0,0 +1,6 @@
|
|||
package types
|
||||
|
||||
// Error returns the error message
|
||||
func (e ErrorResponse) Error() string {
|
||||
return e.Message
|
||||
}
|
Loading…
Reference in a new issue