This commit is contained in:
iacore
2024-10-05 15:22:14 +00:00
parent 2f4e95d002
commit bbec5f6496
2 changed files with 7 additions and 6 deletions
+6 -5
View File
@@ -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
View File
@@ -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
}