mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core): Handle scoped resource not existing with 404 (#16022)
This commit is contained in:
committed by
GitHub
parent
b10effb3fc
commit
42b9a8a0e7
@@ -1260,12 +1260,12 @@ describe('PATCH /credentials/:id', () => {
|
||||
expect(response.statusCode).toBe(404);
|
||||
});
|
||||
|
||||
test('should fail with a 403 if the credential does not exist and the actor does not have the global credential:update scope', async () => {
|
||||
test('should fail with a 404 if the credential does not exist and the actor does not have the global credential:update scope', async () => {
|
||||
const response = await authMemberAgent
|
||||
.patch('/credentials/123')
|
||||
.send(randomCredentialPayload());
|
||||
|
||||
expect(response.statusCode).toBe(403);
|
||||
expect(response.statusCode).toBe(404);
|
||||
});
|
||||
|
||||
test('should fail with a 400 is credential is managed', async () => {
|
||||
|
||||
Reference in New Issue
Block a user