balena-io-modules / jellyschema

JellySchema - data validation, UI form generation
Apache License 2.0
4 stars 2 forks source link

Fix debug formatting of serde values in errors #12

Open cyplo opened 6 years ago

cyplo commented 6 years ago

Right now when the parsing of the DSL fails the error oftentimes includes a full dump of the structure, however it is enclosed within the error message string and thus formatted poorly, example:

Error: CompilationError { message: "cannot deserialize String(\n    \"busadjaws\"\n) as integer" }

Imagine this being a more complicated struct - it gets worse.