git-lfs/errors
Chris Darroch 242fe2c0ee errors/types.go: correctly wrap retriable errors
In commits 2197f76ddeae848814d5297593f6bc0ea0d6e13e and
4fe0a8db4f94725078babc8eadc98f318655a05b of PR #3449 support was added
to parse any Retry-After headers provided by a server with a 429 response
and delay making further requests until the appropriate time.  As part of
this work, the NewRetriableLaterError() function in the "errors" package
was introduced, which attempts to parse the Retry-After header value.

This method accepts an input error, such as that defined by the
handleResponse() method of the "lfshttp" package, with the expectation
that it will be wrapped in a new retriableLaterError structure.

However, the NewRetriableLaterError() function overwrites its input
"err" argument when it attempts to parse the header, and so only
wraps a "nil" value.  We can resolve this problem by using a different
name for the errors returned from the header parsing attempts.

As well, we rename the value returned from the attempt to parse the
header as a timestamped formatted according to RFC 1123, so it does
not collide with the name of the standard library's "time" package.
2024-06-18 23:31:15 -07:00
..
context.go errors: remove Error prefix 2016-08-19 14:03:39 -06:00
errors_test.go Fix typos 2022-01-05 08:49:08 +02:00
errors.go Fix typos 2022-01-05 08:49:08 +02:00
types_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
types.go errors/types.go: correctly wrap retriable errors 2024-06-18 23:31:15 -07:00