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 @@ -31,6 +31,7 @@ import { DBStudio } from '@sofie-automation/corelib/dist/dataModel/Studio'
3131import { UserPermissions } from '@sofie-automation/meteor-lib/dist/userPermissions'
3232import { assertConnectionHasOneOfPermissions , RequestCredentials } from '../../security/auth'
3333import { blueprintsPerformDevelopmentMode } from './development'
34+ import { inspect } from 'util'
3435
3536const PERMISSIONS_FOR_MANAGE_BLUEPRINTS : Array < keyof UserPermissions > = [ 'configure' ]
3637
@@ -174,8 +175,12 @@ async function innerUploadBlueprint(
174175 let blueprintManifest : SomeBlueprintManifest | undefined
175176 try {
176177 blueprintManifest = evalBlueprint ( newBlueprint )
177- } catch ( _e ) {
178- throw new Meteor . Error ( 400 , `Blueprint ${ blueprintId } failed to parse` )
178+ } catch ( error ) {
179+ console . log ( 'Parsing error:' , error )
180+ throw new Meteor . Error (
181+ 400 ,
182+ `Blueprint ${ blueprintId } failed to parse; error: ${ ( error as Error ) . message } .\n${ inspect ( error , { depth : 5 } ) } `
183+ )
179184 }
180185
181186 if ( ! _ . isObject ( blueprintManifest ) )
You can’t perform that action at this time.
0 commit comments