feat: more error codes

This commit is contained in:
Nevo David 2025-07-13 13:43:58 +07:00
parent 48f4e78b0e
commit 67cd78869c
2 changed files with 9 additions and 2 deletions

View File

@ -51,6 +51,13 @@ export class FacebookProvider extends SocialAbstract implements SocialProvider {
};
}
if (body.indexOf('1366046') > -1) {
return {
type: 'bad-body' as const,
value: 'Photos should be smaller than 4 MB and saved as JPG, PNG',
};
}
if (body.indexOf('1390008') > -1) {
return {
type: 'bad-body' as const,

View File

@ -58,7 +58,7 @@ export class InstagramProvider
};
}
if (body.indexOf('The user is not an Instagram Business') > -1) {
if (body.toLowerCase().indexOf('the user is not an instagram business') > -1) {
return {
type: 'refresh-token' as const,
value:
@ -66,7 +66,7 @@ export class InstagramProvider
};
}
if (body.indexOf('Error validating access token') > -1) {
if (body.toLowerCase().indexOf('session has been invalidated') > -1) {
return {
type: 'refresh-token' as const,
value: 'Please re-authenticate your Instagram account',