diff --git a/swarm/api/http/error_templates.go b/swarm/api/http/error_templates.go index f3c643c90d..c30019bbdd 100644 --- a/swarm/api/http/error_templates.go +++ b/swarm/api/http/error_templates.go @@ -26,361 +26,269 @@ parsed by Go's html/template package */ package http +const css = ` + +` + //This returns the HTML for generic errors func GetGenericErrorPage() string { page := ` - + + - - - - - - - + + + + Swarm::HTTP Error Page + + ` + css + ` -
+

There was a problem serving the requested page

+
+ + + + -
-
- -
-
-

There was a problem serving the requested page

-
-
-
{{.Timestamp}}
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - -
- Hmmmmm....Swarm was not able to serve your request! -
- Error message: -
- {{.Msg}} -
- {{.Details}} -
- Error code: -
- {{.Code}} -
-
-
- - +
+
+

Hmmmmm....Swarm was not able to serve your request!

+

Error message:

+

{{.Msg}}

+

{{.Details}}

+
+ +
+

Error code:

+

{{.Code}}

+
+ +
- -` + + ` return page } //This returns the HTML for a 404 Not Found error func GetNotFoundErrorPage() string { page := ` - + + - - - - - - - + + + + Swarm::404 HTTP Not Found + + ` + css + ` -
+

Resource Not Found

+
+ + + + + +
+ +
+

Unfortunately, the resource you were trying to access could not be found on swarm.

+

{{.Msg}}

+

{{.Details}}

+
-
-
- -
-
-

Resource Not Found

-
-
-
{{.Timestamp}}
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- Unfortunately, the resource you were trying to access could not be found on swarm. -
-
- {{.Msg}} -
- {{.Details}} -
- Error code: -
- {{.Code}} -
-
-
- - +
+

Error code:

+

{{.Code}}

+
+
- -` + + ` return page } @@ -389,173 +297,51 @@ func GetNotFoundErrorPage() string { //this page is returned with a clickable list the existing disambiguation links in the manifest func GetMultipleChoicesErrorPage() string { page := ` - + + - - - - - - - + + + + Swarm::HTTP Disambiguation Page + + ` + css + ` -
+

Swarm: disambiguation

+
+ + + + + +
+ +
+

Your request yields ambiguous results!

+

Your request may refer to:

+

{{.Details}}

+
-
-
- -
-
-

Swarm: disambiguation

-
-
-
{{.Timestamp}}
-
-
- - -
- - - - - - - - - - - - - - - - - - - - -
- Your request yields ambiguous results! -
- Your request may refer to: -
- {{ .Details}} -
- Error code: -
- {{.Code}} -
-
-
- - +
+

Error code:

+

{{.Code}}

+
+
- -` + + ` return page }