package errhttp
import "github.com/containerd/errdefs/errhttp"
Package errhttp provides utility functions for translating errors to and from a HTTP context.
The functions ToHTTP and ToNative can be used to map server-side and client-side errors to the correct types.
Index ¶
Functions ¶
func ToHTTP ¶
ToHTTP returns the best status code for the given error
func ToNative ¶
ToNative returns the error best matching the HTTP status code
Source Files ¶
- Version
- v0.2.0
- Published
- Sep 2, 2024
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 1 hour ago –
Tools for package owners.