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