Skip to content

RUST-1574 Default errmsg field to empty string #829

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

Merged
merged 1 commit into from
Feb 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ pub struct CommandError {
pub code_name: String,

/// A description of the error that occurred.
#[serde(rename = "errmsg")]
#[serde(rename = "errmsg", default = "String::new")]
pub message: String,

/// The topology version reported by the server in the error response.
Expand Down Expand Up @@ -648,7 +648,7 @@ pub struct WriteConcernError {
pub code_name: String,

/// A description of the error that occurred.
#[serde(rename = "errmsg")]
#[serde(rename = "errmsg", default = "String::new")]
pub message: String,

/// A document identifying the write concern setting related to the error.
Expand Down Expand Up @@ -687,7 +687,7 @@ pub struct WriteError {
pub code_name: Option<String>,

/// A description of the error that occurred.
#[serde(rename = "errmsg")]
#[serde(rename = "errmsg", default = "String::new")]
pub message: String,

/// A document providing more information about the write error (e.g. details
Expand Down Expand Up @@ -725,7 +725,7 @@ pub struct BulkWriteError {
pub code_name: Option<String>,

/// A description of the error that occurred.
#[serde(rename = "errmsg")]
#[serde(rename = "errmsg", default = "String::new")]
pub message: String,

/// A document providing more information about the write error (e.g. details
Expand Down