typedb icon indicating copy to clipboard operation
typedb copied to clipboard

Restrict the type of errors that we log on the server

Open haikalpribadi opened this issue 3 years ago • 2 comments

Description

We should restrict the type of errors that we log on the server. Expected error handling from the server side does not need to be logged - they create noise. This reduces user confidence in server stability, when the server is actually stable.

Environment

  1. OS (where Grakn server runs): all
  2. Grakn version (and platform): Grakn Core 2.0.0
  3. Grakn client: all
  4. Other environment details: NA

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Run Grakn server
  2. Run any query that contains any potential user error (not unexpected server error), e.g. insert data before schema
  3. We will see server logs populated with errors.

However, the errors in server logs are not actual "server errors". They are "error handlings" of "user errors".

Expected Output

Nothing

Actual Output

Lots of stack trace

Additional information

This reduces user confidence in server stability, when the server is actually stable.

haikalpribadi avatar Mar 26 '21 12:03 haikalpribadi

And then there are errors like the one below which should not come with a suggestion for the user to check the server logs. It's not needed as the error is expected.

haikalpribadi avatar Apr 15 '21 20:04 haikalpribadi

As part of this work, and the more general error architecture, it would be good to have immutable error codes that don't change over time. I think a good solution to this is to have 'versions' (Just like protocol and data encoding). In the same version, we only add new errors to the end. Then we can bump the error codes version and re-sort the errors. All errors printed should have the version prepended or appended to ensure uniqueness.

flyingsilverfin avatar Aug 31 '23 11:08 flyingsilverfin