# Functions

Client returns an client specific ProblemDetails error object.
Error is used just like http.Error to create and immediately issue an error.
Errorf is used like fmt.Errorf to create and return errors.
Internal returns an internal ProblemDetails error object.
MustWrite is like Write, but if the error isn't a ProblemDetails object the error is written as a new problem details object, HTTP Internal Server Error.
New returns a ProblemDetails error object with the given HTTP status code.
NewValidationProblem creates an object to represent a server-side validation error.
Write writes the supplied error if it's a ProblemDetails, returning nil; otherwise it returns the error untouched for the caller to handle.

# Constants

ContentProblemDetails is the correct MIME type to use when returning a problem details object as JSON.

# Structs

ProblemDetails provides a standard encapsulation for problems encountered in web applications and REST APIs.
ValidationError indicates a server-side validation error for data submitted as JSON or via a web form.
ValidationProblem is an example of extending the ProblemDetails structure as per the form validation example in section 3 of RFC 7807, to support reporting of server-side data validation errors.

# Interfaces

HTTPError is the minimal interface needed to be able to Write a problem, defined so that ProblemDetails can be encapsulated and expanded as needed.