mirror of
https://github.com/n8n-io/n8n.git
synced 2026-08-28 17:22:01 +08:00
fix(Databricks Node): Change default tokenExpiredStatusCode from 401 to 403 (#34325)
Co-authored-by: Prathamesh Hukkeri <prathamesh04@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
fe649efcbf
commit
6f3d2b9faa
@@ -55,14 +55,14 @@ export class DatabricksOAuth2Api implements ICredentialType {
|
||||
{
|
||||
// Re-declared because the base `oAuth2Api` field is `doNotInherit`, so it
|
||||
// never reaches the decrypted credential. Without it the value is always
|
||||
// undefined and token refresh is hardcoded to 401 — workspaces fronted by
|
||||
// a proxy that rewrites 401 to 403 can set 403 here to keep refreshing.
|
||||
// undefined and token refresh is hardcoded to 401 — Databricks returns 403
|
||||
// when tokens expire, so the default must be 403.
|
||||
displayName: 'Token Expired Status Code',
|
||||
name: 'tokenExpiredStatusCode',
|
||||
type: 'number',
|
||||
default: 401,
|
||||
default: 403,
|
||||
description:
|
||||
'HTTP status code that indicates the token has expired. Some APIs return 403 instead of 401.',
|
||||
'HTTP status code that indicates the token has expired. Databricks returns 403 when tokens expire.',
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ describe('DatabricksOAuth2Api Credential', () => {
|
||||
expect(field).toBeDefined();
|
||||
});
|
||||
|
||||
it('should default to 401 to preserve existing behavior', () => {
|
||||
expect(field?.default).toBe(401);
|
||||
it('should default to 403 since Databricks returns 403 for expired tokens', () => {
|
||||
expect(field?.default).toBe(403);
|
||||
});
|
||||
|
||||
it('should be a configurable number field (not hidden)', () => {
|
||||
|
||||
Reference in New Issue
Block a user