Skip to content

How can I handle errors what I can from database #2284

Answered by a8m
petar-arandjic asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @petar-arandjic! ent wraps or returns the underlying driver errors. So, you can either use type-assertion or errors.Is/errors.As helpers to extract these types. See examples in our integration-test: 1, 2.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@petar-arandjic
Comment options

@shinebayar-g
Comment options

Answer selected by petar-arandjic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants