Add status code for service account error (#1707)

This commit is contained in:
Iván Ovejero
2021-06-22 19:59:27 +02:00
committed by GitHub
parent 6bbff58faa
commit 07a3dbb372
5 changed files with 21 additions and 1 deletions

View File

@@ -74,6 +74,10 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
}
} catch (error) {
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
error.statusCode = '401';
}
throw new NodeApiError(this.getNode(), error);
}
}