diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-06-30 16:03:45 -0230 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-06-30 16:03:45 -0230 |
| commit | 7d0f3d56121feccfe84600a39c362ba8bfcaa042 (patch) | |
| tree | 0e412db49a133af1020ae13d6a0f3930fa04ee06 /err.go | |
| download | xmrpayclnt-7d0f3d56121feccfe84600a39c362ba8bfcaa042.zip | |
init
Diffstat (limited to 'err.go')
| -rw-r--r-- | err.go | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +package xmrpayclnt + +import ( + "fmt" + "net/http" +) + +type errResp struct { + resp *http.Response + wantStatus int +} + +func (e errResp) Error() string { + req := e.resp.Request + return fmt.Sprintf("%s %s: %s (expected %d)", + req.Method, req.URL, e.resp.Status, e.wantStatus) +} |