Merge upstream 2025-01-17 #40

Merged
ashten merged 35 commits from sugar/forkey:merge-upstream-2025-01-17 into main 2025-02-03 16:05:49 +00:00
2 changed files with 9 additions and 4 deletions
Showing only changes of commit 71c2921b9d - Show all commits

View file

@ -97,10 +97,15 @@ export class SigninApiService {
reply.code(429); reply.code(429);
return { return {
error: { error: {
message: 'Too many failed attempts to sign in. Try again later.', message: 'Rate limit exceeded. Please try again later.',
code: 'TOO_MANY_AUTHENTICATION_FAILURES', code: 'RATE_LIMIT_EXCEEDED',
id: '22d05606-fbcf-421a-a2db-b32610dcfd1b', id: '22d05606-fbcf-421a-a2db-b32610dcfd1b',
}, info: {
message: 'Too many failed attempts to sign in.',
code: 'TOO_MANY_AUTHENTICATION_FAILURES',
id: '6c181469-ecb9-42d2-82c9-60db5486a819',
},
}
}; };
} }

View file

@ -79,7 +79,7 @@ export async function apiErrorHandler(err: Misskey.api.APIError, endpoint?: stri
} else if (err.code === 'ROLE_PERMISSION_DENIED') { } else if (err.code === 'ROLE_PERMISSION_DENIED') {
title = i18n.ts.permissionDeniedError; title = i18n.ts.permissionDeniedError;
text = i18n.ts.permissionDeniedErrorDescription; text = i18n.ts.permissionDeniedErrorDescription;
} else if (err.code?.startsWith('TOO_MANY')) { } else if (err.code?.startsWith('TOO_MANY_')) {
title = i18n.ts.youCannotCreateAnymore; title = i18n.ts.youCannotCreateAnymore;
text = `${i18n.ts.error}: ${err.id}`; text = `${i18n.ts.error}: ${err.id}`;
} }