mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
cleanup
This commit is contained in:
+6
-5
@@ -65,11 +65,12 @@ func retryRequest(ctx context.Context, reqFunc func(context.Context, string) (*r
|
||||
|
||||
if token == nil && !isPost {
|
||||
tokenManager.ResetAllTokens()
|
||||
return nil, i18n.Errorf("All tokens (%d) are timed out, resetting all tokens to their initial good state.\n"+
|
||||
"Consider providing additional tokens in PIXIVFE_TOKEN or reviewing API request level backoff configuration.\n"+
|
||||
"Please refer the following documentation for additional information:\n"+
|
||||
"- https://pixivfe-docs.pages.dev/hosting/obtaining-pixivfe-token/\n"+
|
||||
"- https://pixivfe-docs.pages.dev/hosting/environment-variables/#exponential-backoff-configuration",
|
||||
return nil, i18n.Errorf(
|
||||
`All tokens (%d) are timed out, resetting all tokens to their initial good state.
|
||||
Consider providing additional tokens in PIXIVFE_TOKEN or reviewing API request level backoff configuration.
|
||||
Please refer the following documentation for additional information:
|
||||
- https://pixivfe-docs.pages.dev/hosting/obtaining-pixivfe-token/
|
||||
- https://pixivfe-docs.pages.dev/hosting/environment-variables/#exponential-backoff-configuration`,
|
||||
len(config.GlobalConfig.Token))
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ func (s UserArtCategory) Validate() error {
|
||||
s != UserArt_Manga &&
|
||||
s != UserArt_Bookmarks &&
|
||||
s != UserArt_Novel {
|
||||
return i18n.Errorf("Invalid work category: %#v. "+`Only "%s", "%s", "%s", "%s", "%s" and "%s" are available`, s, UserArt_Any, UserArt_AnyAlt, UserArt_Illustration, UserArt_Manga, UserArt_Bookmarks, UserArt_Novel)
|
||||
return i18n.Errorf(`Invalid work category: %#v. Only "%s", "%s", "%s", "%s", "%s" and "%s" are available`, s, UserArt_Any, UserArt_AnyAlt, UserArt_Illustration, UserArt_Manga, UserArt_Bookmarks, UserArt_Novel)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user