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:
Brian Goff 2019-07-01 09:16:20 -07:00
parent a43a2ed746
commit 6ddd43b589
1 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,6 @@
package types
// Error returns the error message
func (e ErrorResponse) Error() string {
return e.Message
}