aboutsummaryrefslogtreecommitdiffstats
path: root/err.go
diff options
context:
space:
mode:
Diffstat (limited to 'err.go')
-rw-r--r--err.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/err.go b/err.go
new file mode 100644
index 0000000..cbd2336
--- /dev/null
+++ b/err.go
@@ -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)
+}