Skip to content

Commit

Permalink
Preserve case of server error messages
Browse files Browse the repository at this point in the history
Server errors can contain case-sensitive values like subject names which
can cause confusion if not displayed in their original case.
  • Loading branch information
oscarwcl committed May 10, 2024
1 parent 5d007ca commit 945ccba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion async-nats/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ impl ServerError {
fn new(error: String) -> ServerError {
match error.to_lowercase().as_str() {
"authorization violation" => ServerError::AuthorizationViolation,
other => ServerError::Other(other.to_string()),
_ => ServerError::Other(error.to_string()),
}
}
}
Expand Down

0 comments on commit 945ccba

Please sign in to comment.