parseable icon indicating copy to clipboard operation
parseable copied to clipboard

Improve error message

Open nitisht opened this issue 3 years ago • 5 comments

In case a stream is empty, i.e. has no log data yet, the Query API responds with Failed to execute query due to err: missing record batch.

This is confusing and might not make sense to end user. This error should be changed to say No log entries found in log stream xxx. Also the status code should be 404.

nitisht avatar Oct 03 '22 10:10 nitisht

I tried to find where this error Failed to execute query due to err: missing record batch is placed but couldn't find it. Can you point it for me?

kmartin62 avatar Oct 03 '22 11:10 kmartin62

We'll get back in a bit @kmartin62

nitisht avatar Oct 03 '22 12:10 nitisht

@kmartin62 Sorry for inconvenience. After one of my recent PR this has changed to Bad request: Error parsing query: Stream is not initialized yet. Post an event first. This is fine but we actually want more readable error than this.

Error types for now compose upwards the call stack. The type is QueryError::Parse(ParseError::Validation(QueryValidationError))

For this specific issue, main problem arises from coupling of schema with Query. @nitisht I will open a new issue for this.

trueleo avatar Oct 03 '22 13:10 trueleo

Error types for now compose upwards the call stack. The type is QueryError::Parse(ParseError::Validation(QueryValidationError))

Can you link to this in the repo.

nitisht avatar Oct 03 '22 15:10 nitisht

Error types for now compose upwards the call stack. The type is QueryError::Parse(ParseError::Validation(QueryValidationError))

Can you link to this in the repo.

here also mentioned in #147

trueleo avatar Oct 03 '22 15:10 trueleo

closing this as duplicate of #147

nitisht avatar Nov 20 '22 02:11 nitisht