ax(mining): replace prose comment with usage example on isRetryableError
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:
parent
8fe169aeb6
commit
8bfb425fda
1 changed files with 2 additions and 1 deletions
|
|
@ -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 ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue