Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[request] Improve null values error handling #352

Open
akamensky opened this issue May 28, 2021 · 0 comments
Open

[request] Improve null values error handling #352

akamensky opened this issue May 28, 2021 · 0 comments
Labels
feature request New feature or request

Comments

@akamensky
Copy link
Contributor

CH defaults to NOT NULL for columns, which is different from many other databases that default to NULL. Because of this it appears to be common that users will get NPE error which does not specify the cause of failure.

The error here is very generic and does not point in the right direction. The point of having error messages at all is to make it clear what happened and possibly point to correct solution.

I suggest to:

  • catch this exception
  • and check if the exception happened because of null being received for non-nullable column
  • if it is then throw another exception which provides much clearer message (i.e. received NULL value for NOT NULL column or something similar, maybe even include column name in the message if possible).

This will allow users to handle those issues in much cleaner way.

@pan3793 pan3793 added the feature request New feature or request label May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants