summaryrefslogtreecommitdiff
path: root/src/error.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-03-18 10:45:10 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-04-05 12:26:15 +0200
commit343836597df3efd6f31a68e29ff82b6ec4979f69 (patch)
treefa00080e0379859a9b4b770bbd36743f56731d61 /src/error.go
parent42488834f8f60627830732428017cdf26733f12c (diff)
Move HTTP GET/POST methods to its own file
Diffstat (limited to 'src/error.go')
-rw-r--r--src/error.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/error.go b/src/error.go
deleted file mode 100644
index 13803cc..0000000
--- a/src/error.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package eduvpn
-
-import "fmt"
-
-// Error structures defined here are used throughout the code
-
-type HTTPResourceError struct {
- URL string
- Err error
-}
-
-func (e *HTTPResourceError) Error() string {
- return fmt.Sprintf("failed obtaining HTTP resource %s with error %v", e.URL, e.Err)
-}
-
-type HTTPStatusError struct {
- URL string
- Status int
-}
-
-func (e *HTTPStatusError) Error() string {
- return fmt.Sprintf("failed obtaining HTTP resource %s as it gave an unsuccesful status code %d", e.URL, e.Status)
-}
-
-type HTTPReadError struct {
- URL string
- Err error
-}
-
-func (e *HTTPReadError) Error() string {
- return fmt.Sprintf("failed reading HTTP resource %s with error %v", e.URL, e.Err)
-}
-
-type HTTPParseJsonError struct {
- URL string
- Body string
- Err error
-}
-
-func (e *HTTPParseJsonError) Error() string {
- return fmt.Sprintf("failed parsing json %s for HTTP resource %s with error %v", e.Body, e.URL, e.Err)
-}