feat: more error codes
This commit is contained in:
parent
48f4e78b0e
commit
67cd78869c
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue