Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion meteor/server/api/blueprints/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { DBStudio } from '@sofie-automation/corelib/dist/dataModel/Studio'
import { UserPermissions } from '@sofie-automation/meteor-lib/dist/userPermissions'
import { assertConnectionHasOneOfPermissions, RequestCredentials } from '../../security/auth'
import { blueprintsPerformDevelopmentMode } from './development'
import { stringifyError } from '@sofie-automation/shared-lib/dist/lib/stringifyError'

const PERMISSIONS_FOR_MANAGE_BLUEPRINTS: Array<keyof UserPermissions> = ['configure']

Expand Down Expand Up @@ -170,7 +171,9 @@ async function innerUploadBlueprint(
let blueprintManifest: SomeBlueprintManifest | undefined
try {
blueprintManifest = evalBlueprint(newBlueprint)
} catch (_e) {
} catch (e) {
logger.error(`Error evaluating Blueprint "${blueprintId}": "${stringifyError(e)}"`)

throw new Meteor.Error(400, `Blueprint ${blueprintId} failed to parse`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put more information in the request response here as well? That way I can see it straight away when I run yarn build-sync-local on my blueprints - I don't have to go hunting in server log files somewhere.

I did try this when I had a bad blueprint upload to diagnose, but didn't get around to making a PR:

release53...rjmunro/improve-blueprint-upload-errors

}

Expand Down
Loading