Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return a better error message when dynamic config file cannot be parsed as yaml #867

Closed
vanstee opened this issue Jul 19, 2016 · 1 comment
Assignees
Milestone

Comments

@vanstee
Copy link
Member

vanstee commented Jul 19, 2016

Currently cogctl responds with cogctl: ERROR: "Internal server error" if the yaml file could not be parsed as yaml (in this case an ENV var looking string was uploaded). We should make sure we just respond with cogctl: ERROR: "Config file could not be parsed as yaml".

@christophermaier
Copy link
Collaborator

christophermaier commented Jul 19, 2016

Further context: this was uncovered when a file with the contents

AWS_ACCESS_KEY_ID=XXX
AWS_SECRET_ACCESS_KEY=XXX

was uploaded via cogctl. Instead, it should have been the YAML

---
AWS_ACCESS_KEY_ID: "XXX"
AWS_SECRET_ACCESS_KEY: "XXX"

Somehow, the contents of the first file made it to Cog as a single string, instead of the map that was expected. This caused an Ecto changeset error, which resulted in the aforementioned "Internal server error".

@christophermaier christophermaier added this to the Cog 0.12.0 milestone Jul 19, 2016
@kevsmith kevsmith modified the milestones: Cog 0.12.0, Cog 0.13.0 Aug 4, 2016
@kevsmith kevsmith modified the milestones: Cog 0.13.0, Cog 0.14 Aug 22, 2016
@kevsmith kevsmith self-assigned this Sep 19, 2016
kevsmith pushed a commit that referenced this issue Sep 19, 2016
Catch Ecto exception and use Cog.ChangesetView to render it.

Fixes #867
@kevsmith kevsmith removed the review label Sep 19, 2016
kevsmith pushed a commit that referenced this issue Sep 19, 2016
Catch Ecto exception and use Cog.ChangesetView to render it.

Fixes #867
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants