Error is an ACME error, defined in Problem Details for HTTP APIs doc http://tools.ietf.org/html/draft-ietf-appsawg-http-problem.
| 87 | // Error is an ACME error, defined in Problem Details for HTTP APIs doc |
| 88 | // http://tools.ietf.org/html/draft-ietf-appsawg-http-problem. |
| 89 | type Error struct { |
| 90 | // StatusCode is The HTTP status code generated by the origin server. |
| 91 | StatusCode int |
| 92 | // ProblemType is a URI reference that identifies the problem type, |
| 93 | // typically in a "urn:acme:error:xxx" form. |
| 94 | ProblemType string |
| 95 | // Detail is a human-readable explanation specific to this occurrence of the problem. |
| 96 | Detail string |
| 97 | // Instance indicates a URL that the client should direct a human user to visit |
| 98 | // in order for instructions on how to agree to the updated Terms of Service. |
| 99 | // In such an event CA sets StatusCode to 403, ProblemType to |
| 100 | // "urn:ietf:params:acme:error:userActionRequired" and a Link header with relation |
| 101 | // "terms-of-service" containing the latest TOS URL. |
| 102 | Instance string |
| 103 | // Header is the original server error response headers. |
| 104 | // It may be nil. |
| 105 | Header http.Header |
| 106 | // Subproblems may contain more detailed information about the individual problems |
| 107 | // that caused the error. This field is only sent by RFC 8555 compatible ACME |
| 108 | // servers. Defined in RFC 8555 Section 6.7.1. |
| 109 | Subproblems []Subproblem |
| 110 | } |
| 111 | |
| 112 | func (e *Error) Error() string { |
| 113 | str := fmt.Sprintf("%d %s: %s", e.StatusCode, e.ProblemType, e.Detail) |
nothing calls this directly
no outgoing calls
no test coverage detected