File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
meteor/server/api/blueprints Expand file tree Collapse file tree 1 file changed +7
-2
lines changed 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 { inspect } from 'util'
3536
3637const PERMISSIONS_FOR_MANAGE_BLUEPRINTS : Array < keyof UserPermissions > = [ 'configure' ]
3738
@@ -170,8 +171,12 @@ 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 ( error ) {
175+ console . log ( 'Parsing error:' , error )
176+ throw new Meteor . Error (
177+ 400 ,
178+ `Blueprint ${ blueprintId } failed to parse; error: ${ ( error as Error ) . message } .\n${ inspect ( error , { depth : 5 } ) } `
179+ )
175180 }
176181
177182 if ( ! _ . isObject ( blueprintManifest ) )
You can’t perform that action at this time.
0 commit comments