File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
meteor/server/api/blueprints Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -217,9 +217,8 @@ describe('Test blueprint management api', () => {
217217 )
218218 } )
219219 test ( 'empty body' , async ( ) => {
220- await expect ( uploadBlueprint ( DEFAULT_CONNECTION , protectString ( 'blueprint99' ) , '' ) ) . rejects . toThrowMeteor (
221- 400 ,
222- 'Blueprint blueprint99 failed to parse'
220+ await expect ( uploadBlueprint ( DEFAULT_CONNECTION , protectString ( 'blueprint99' ) , '' ) ) . rejects . toMatchToString (
221+ / E r r o r e v a l u a t i n g B l u e p r i n t " b l u e p r i n t 9 9 " ( .+ ) /
223222 )
224223 } )
225224 test ( 'body not a manifest' , async ( ) => {
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import { DBStudio } from '@sofie-automation/corelib/dist/dataModel/Studio'
3232import { UserPermissions } from '@sofie-automation/meteor-lib/dist/userPermissions'
3333import { assertConnectionHasOneOfPermissions , RequestCredentials } from '../../security/auth'
3434import { blueprintsPerformDevelopmentMode } from './development'
35+ import { stringifyError } from '@sofie-automation/shared-lib/dist/lib/stringifyError'
3536
3637const PERMISSIONS_FOR_MANAGE_BLUEPRINTS : Array < keyof UserPermissions > = [ 'configure' ]
3738
@@ -170,8 +171,10 @@ async function innerUploadBlueprint(
170171 let blueprintManifest : SomeBlueprintManifest | undefined
171172 try {
172173 blueprintManifest = evalBlueprint ( newBlueprint )
173- } catch ( _e ) {
174- throw new Meteor . Error ( 400 , `Blueprint ${ blueprintId } failed to parse` )
174+ } catch ( e ) {
175+ logger . error ( `Error evaluating Blueprint "${ blueprintId } ": "${ stringifyError ( e ) } "` )
176+
177+ throw new Meteor . Error ( 400 , `Error evaluating Blueprint "${ blueprintId } ": "${ stringifyError ( e ) } "` )
175178 }
176179
177180 if ( ! _ . isObject ( blueprintManifest ) )
You can’t perform that action at this time.
0 commit comments