ax(mining): replace prose comment with usage example on isRetryableError
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

AX principle 2: comments show HOW with real values, not WHAT the
function does — the signature already says that.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 16:25:43 +01:00
parent 8fe169aeb6
commit 8bfb425fda
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -125,7 +125,8 @@ func respondWithMiningError(c *gin.Context, err *MiningError) {
c.JSON(err.StatusCode(), apiErr)
}
// isRetryableError determines if an error status code is retryable
// isRetryableError(http.StatusServiceUnavailable) // => true
// isRetryableError(http.StatusNotFound) // => false
func isRetryableError(status int) bool {
return status == http.StatusServiceUnavailable ||
status == http.StatusTooManyRequests ||