k8snetworkplumbingwg / net-attach-def-admission-controller

An admission controller to check resources as defined by the NPWG spec
Apache License 2.0
4 stars 15 forks source link

Improved JSON parsing error messaging #2

Open dougbtv opened 5 years ago

dougbtv commented 5 years ago

Feng mentioned during a recent demo that one thing that might not be intuitive to users is how to fix an error that's caused by a JSON parsing error, with an error message such as:

error parsing configuration: invalid character ':' after top-level value

Two thoughts regarding this:

  1. We could potentially wrap / trap this error and give a more general message, maybe something along the lines of "JSON parsing error in config: field, please check that there's valid JSON within"
  2. We could go upstream and update the CNI libraries to provide some better messaging.
dcbw commented 5 years ago

@dougbtv we should certainly do #2 regardless