influx-cli icon indicating copy to clipboard operation
influx-cli copied to clipboard

Add hint to `influx write` if CLI arg isn't valid LP

Open danxmoran opened this issue 4 years ago • 0 comments

influx write supports reading data as a positional arg, or from a file. It's easy for users to get mixed up and accidentally pass a filename as a positional arg, leading to error messages like:

Error: failed to write data: 400 Bad Request: unable to parse 'latest-observations.lp': missing fields

It'd be nice to add some sort of hint about missing the --file flag to the error message, if we can figure out a heuristic for detecting this type of error.

danxmoran avatar Aug 03 '21 13:08 danxmoran