mirror of
https://github.com/n8n-io/n8n
synced 2026-04-21 15:47:20 +00:00
fix(X (Twitter) Node): Surface API error message for insufficient access level (#27603)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Shireen Missi <94372015+ShireenMissi@users.noreply.github.com>
This commit is contained in:
parent
daf233f24e
commit
5fdb18b5f9
1 changed files with 2 additions and 1 deletions
|
|
@ -47,7 +47,8 @@ export async function twitterApiRequest(
|
|||
if (error.error?.required_enrollment === 'Appropriate Level of API Access') {
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
'The operation requires Twitter Api to be either Basic or Pro.',
|
||||
(error.error.detail as string) ??
|
||||
'This operation requires a higher level of X (Twitter) API access. Please check your subscription at developer.twitter.com.',
|
||||
);
|
||||
} else if (error.errors && error.error?.errors[0].message.includes('must be ')) {
|
||||
throw new NodeOperationError(this.getNode(), error.error.errors[0].message as string);
|
||||
|
|
|
|||
Loading…
Reference in a new issue