...

Package httperr

import "github.com/goph/emperror/httperr"
Overview
Index

Overview ▾

func HTTPRequest

func HTTPRequest(err error) (*http.Request, bool)

HTTPRequest extracts an HTTP request from an error (if any).

It loops through the whole error chain (if any).

func WithHTTPRequest

func WithHTTPRequest(err error, r *http.Request) error

WithHTTPRequest attaches an HTTP request to the error.