diff --git a/packages/server/modules/shared/authz.ts b/packages/server/modules/shared/authz.ts index 2aa8152a9..74b90c27b 100644 --- a/packages/server/modules/shared/authz.ts +++ b/packages/server/modules/shared/authz.ts @@ -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 diff --git a/packages/server/modules/shared/test/authz.spec.js b/packages/server/modules/shared/test/authz.spec.js index 5eb88c971..004c30d96 100644 --- a/packages/server/modules/shared/test/authz.spec.js +++ b/packages/server/modules/shared/test/authz.spec.js @@ -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', () => {