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

fix(postgres): format unicode error messages from driver #11754

Merged

Conversation

thalesmg
Copy link
Contributor

@thalesmg thalesmg commented Oct 11, 2023

Fixes https://emqx.atlassian.net/browse/EMQX-11024

Sample error:

{error, error, <<"42501">>, insufficient_privilege,
<<229,175,185,232,161,168,32,109,113,116,116,95,117,115,101,114,32,230,157,131,233,153,144,228,184,141,229,164,159>>,
[]}

Simulating the error log:

2023-10-11T20:28:31.666871+00:00 [error] mfa: emqx_connector_pgsql:deleteme/0(570), driver_error_code: <<"42501">>, driver_error_codename: insufficient, driver_error_message: 对表 mqtt_user 权限不够, driver_raw_reason: {error,error,<<"42501">>,insufficient,<<229,175,185,232,161,168,32,109,113,116,116,95,117,115,101,114,32,230,157,131,233,153,144,228,184,141,229,164,159>>,[]}, driver_severity: error

Summary

🤖 Generated by Copilot at 58c40bb

Improved error logging and updated version for emqx_connector. The pull request enhances the log messages for various error events in the emqx_connector_pgsql module and updates the version number of the emqx_connector application to 0.1.33.

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • Change log has been added to changes/(ce|ee)/(feat|perf|fix)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • If changed package build workflow, pass this action (manual trigger)
  • Change log has been added to changes/ dir for user-facing artifacts update

@thalesmg thalesmg force-pushed the fix-postgres-error-reason-log-m-20231011 branch from 58c40bb to d9567d4 Compare October 11, 2023 20:35
Fixes https://emqx.atlassian.net/browse/EMQX-11024

Sample error:

```
{error, error, <<"42501">>, insufficient_privilege,
<<229,175,185,232,161,168,32,109,113,116,116,95,117,115,101,114,32,230,157,131,233,153,144,228,184,141,229,164,159>>,
[]}
```
@thalesmg thalesmg force-pushed the fix-postgres-error-reason-log-m-20231011 branch from d9567d4 to b07dddd Compare October 11, 2023 20:56
@thalesmg thalesmg marked this pull request as ready for review October 13, 2023 12:43
@thalesmg thalesmg requested review from JimMoen and a team as code owners October 13, 2023 12:43
@thalesmg thalesmg merged commit 7a6c756 into emqx:master Oct 13, 2023
140 checks passed
@thalesmg thalesmg deleted the fix-postgres-error-reason-log-m-20231011 branch October 13, 2023 12:58
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.

None yet

2 participants