Created
May 28, 2011 18:34
-
-
Save Boldewyn/997109 to your computer and use it in GitHub Desktop.
HTTP Error Responses by MIME Type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a collection of templates, that depict HTTP error messages in different MIME types. | |
Each template expects the parameters | |
* {CODE} - the numeric HTTP error code | |
* {PHRASE} - the reason phrase, e.g., "Not Found" for 404 | |
and in some cases the parameter | |
* {URL} - the requested URL where the error occurred. This value MUST be quoted adeptly for each template. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* {CODE} {PHRASE} */ | |
body {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (this.console && this.console.error) { | |
console.error('{CODE} {PHRASE}\nLocation: {URL}'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"error": true, | |
"errno": {CODE}, | |
"errmsg": "{PHRASE}", | |
"errlocation": "{URL}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<math xmlns="http://www.w3.org/1998/Math/MathML"> | |
<merror>{CODE} {PHRASE}</merror> | |
</math> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iVBORw0KGgoAAAANSUhEUgAAAGQAAABkAQMAAABKLAcXAAAAA1BMVEX/AAAZ4gk3AAAAE0lEQVQYGWMYBaNgFIyCUUBXAAAFeAAB3EUCGwAAAABJRU5ErkJggg== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:http="http://www.w3.org/2006/http#"> | |
<http:Response rdf:ID="response"> | |
<http:httpVersion>1.1</http:httpVersion> | |
<http:statusCodeNumber>{CODE}</http:statusCodeNumber> | |
<http:sc rdf:resource="http://www.w3.org/2008/http-statusCodes#statusCode{CODE}" /> | |
<http:reasonPhrase>{PHRASE}</http:reasonPhrase> | |
<http:headers rdf:parseType="Collection"> | |
<http:MessageHeader> | |
<http:fieldName>Location</http:fieldName> | |
<http:hdrName rdf:resource="http://www.w3.org/2008/http-headers#Location"/> | |
<http:fieldValue>{URL}</http:fieldValue> | |
</http:MessageHeader> | |
</http:headers> | |
</http:Response> | |
</RDF> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"> | |
<rect x="0" y="0" width="100%" height="100%" fill="#F00" /> | |
<text x="30" y="30" font-size="20" font-weight="bold" fill="white">{CODE} {PHRASE}</text> | |
<text x="30" y="60" font-size="16" font-weight="bold" fill="white"> | |
The error occurred while requesting <tspan style="font-family: monospace">{URL}</tspan>. | |
</text> | |
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform"> | |
<template match="/"> | |
<message terminate="yes">{CODE} {PHRASE}</message> | |
</template> | |
</stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment