feat: better erroring for X
This commit is contained in:
parent
da77c227c1
commit
69e39b91b3
|
|
@ -34,6 +34,20 @@ export class XProvider extends SocialAbstract implements SocialProvider {
|
|||
value: string;
|
||||
}
|
||||
| undefined {
|
||||
if (body.includes('usage-capped')) {
|
||||
return {
|
||||
type: 'refresh-token',
|
||||
value:
|
||||
'Posting failed - capped reached. Please try again later',
|
||||
};
|
||||
}
|
||||
if (body.includes('duplicate-rules')) {
|
||||
return {
|
||||
type: 'refresh-token',
|
||||
value:
|
||||
'You have already posted this post, please wait before posting again',
|
||||
};
|
||||
}
|
||||
if (body.includes('The Tweet contains an invalid URL.')) {
|
||||
return {
|
||||
type: 'bad-body',
|
||||
|
|
|
|||
Loading…
Reference in New Issue