Skip to content

Conversation

wuerges
Copy link
Contributor

@wuerges wuerges commented Nov 5, 2024

Dear @blackbeam,

I'm opening this PR to present an issue that I'm having with mysql_async.
Currently, this crate is emitting all Err variants as error! events.

Most of the time this is desirable, but sometimes this level is too severe.

When inserting duplicate values, deleting a value that is in use by another table, matching the Err variant is very convenient. A query that returns Err could be a benign error that is handled by the application, and a lower event level would be better.

This PR matches the ServerError and looks at its error code to decide whether to emit an error! or a warn!.

@blackbeam blackbeam merged commit b653339 into blackbeam:master Dec 13, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants