MCPcopy
hub / github.com/connectrpc/connect-go / NewNotModifiedError

Function NewNotModifiedError

error.go:184–190  ·  view source on GitHub ↗

NewNotModifiedError indicates that the requested resource hasn't changed. It should be used only when handlers wish to respond to conditional HTTP GET requests with a 304 Not Modified. In all other circumstances, including all RPCs using the gRPC or gRPC-Web protocols, it's equivalent to sending an

(headers http.Header)

Source from the content-addressed store, hash-verified

182//
183// [RFC 9110 § 15.4.5]: https://httpwg.org/specs/rfc9110.html#status.304
184func NewNotModifiedError(headers http.Header) *Error {
185 err := NewError(CodeUnknown, errNotModified)
186 if headers != nil {
187 err.meta = headers
188 }
189 return err
190}
191
192func (e *Error) Error() string {
193 message := e.Message()

Callers 2

PingMethod · 0.92
PingMethod · 0.92

Calls 1

NewErrorFunction · 0.85

Tested by 2

PingMethod · 0.74
PingMethod · 0.74