kiln / flourish-sdk

The SDK for developing Flourish templates
Other
80 stars 16 forks source link

Failed `flourish publish` command output is unhelpful #93

Closed aendra-rininsland closed 9 months ago

aendra-rininsland commented 9 months ago

Often when flourish publish fails, you get little more than an error code and a generic error message:

image

Even with the --debug flag it doesn't provide any extra info.

As someone who is typically asked to help people publish these templates on a deadline, the lack of verbosity in these messages frequently makes my life difficult.

markl-canva commented 9 months ago

Hi @aendra-rininsland - there is a server-side fix for this problem, which we're deploying today. If you still see opaque 500 errors like this tomorrow or later, please let us know and we'll investigate, but hopefully this will be resolved soon!

markl-canva commented 9 months ago

As an update, I'm afraid we had to roll-back today's deploy because of a bad bug in one of the other changes, but hopefully we'll redeploy tomorrow morning, so it'll be a little longer before this is fixed. Sorry about that.

markl-canva commented 9 months ago

This fix for this is deployed again now, so I'll close the issue.

aendra-rininsland commented 9 months ago

This is better but also still unhelpful — I don't even have a settings.js file in my repo?

image

markl-canva commented 9 months ago

Sorry, yes, I realise this is still confusing! What happens is that in publishing a template, the template.yml file is converted into multiple .js or .json files, and the validation at this point is in respect to those generated files.

The error you're seeing there means that the somewhere under the settings key in your template.yml file there is an additional property called width, which isn't allowed there.

I think the problem here is that this should be caught by the client-side validation of template.yml, which at the moment is more permissive than the server-side validation. I'll create an internal issue for this, but in the mean time, I hope that explanation will help a bit to figure out these errors. (You might see similar errors for data.json, which means the error is from under the data key in template.yml.

aendra-rininsland commented 9 months ago

That helps quite a lot! Thank you!