mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Add status code for service account error (#1707)
This commit is contained in:
@@ -53,6 +53,10 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
|
|||||||
return await this.helpers.requestOAuth2.call(this, 'googleBooksOAuth2Api', options);
|
return await this.helpers.requestOAuth2.call(this, 'googleBooksOAuth2Api', options);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
|
||||||
|
error.statusCode = '401';
|
||||||
|
}
|
||||||
|
|
||||||
throw new NodeApiError(this.getNode(), error);
|
throw new NodeApiError(this.getNode(), error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,10 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
|
|||||||
return await this.helpers.requestOAuth2.call(this, 'googleDriveOAuth2Api', options);
|
return await this.helpers.requestOAuth2.call(this, 'googleDriveOAuth2Api', options);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
|
||||||
|
error.statusCode = '401';
|
||||||
|
}
|
||||||
|
|
||||||
throw new NodeApiError(this.getNode(), error);
|
throw new NodeApiError(this.getNode(), error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,6 +74,10 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
|
||||||
|
error.statusCode = '401';
|
||||||
|
}
|
||||||
|
|
||||||
throw new NodeApiError(this.getNode(), error);
|
throw new NodeApiError(this.getNode(), error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
|
|||||||
return await this.helpers.requestOAuth2.call(this, 'googleSheetsOAuth2Api', options);
|
return await this.helpers.requestOAuth2.call(this, 'googleSheetsOAuth2Api', options);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
|
||||||
|
error.statusCode = '401';
|
||||||
|
}
|
||||||
|
|
||||||
throw new NodeApiError(this.getNode(), error);
|
throw new NodeApiError(this.getNode(), error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,10 @@ export async function googleApiRequest(
|
|||||||
return await this.helpers.requestOAuth2!.call(this, 'googleSlidesOAuth2Api', options);
|
return await this.helpers.requestOAuth2!.call(this, 'googleSlidesOAuth2Api', options);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
|
||||||
|
error.statusCode = '401';
|
||||||
|
}
|
||||||
|
|
||||||
throw new NodeApiError(this.getNode(), error);
|
throw new NodeApiError(this.getNode(), error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user