chore(error): improve error log message for not found project id (#3507)

This commit is contained in:
Iain Sproat
2024-11-18 16:29:04 +00:00
committed by GitHub
parent 32fed39fb1
commit 4e7a00250c
2 changed files with 13 additions and 2 deletions
+6 -1
View File
@@ -247,7 +247,12 @@ export const validateRequiredStreamFactory =
if (!stream)
return authFailed(
context,
new NotFoundError('Stream inputs are malformed'),
new NotFoundError(
'Project ID is malformed and cannot be found, or the project does not exist',
{
info: { projectId: params.streamId }
}
),
true
)
context.stream = stream
@@ -380,7 +380,13 @@ describe('AuthZ @shared', () => {
context: {}
})
expectAuthError(new NotFoundError('Stream inputs are malformed'), authResult)
expectAuthError(
new NotFoundError(
'Project ID is malformed and cannot be found, or the project does not exist',
{ info: { projectId: 'the need for stream' } }
),
authResult
)
})
})
describe('Escape hatches', () => {