pub fn with_bad_request(field_violations: impl Into<Vec<FieldViolation>>) -> Self {
        ErrorDetails {
            bad_request: Some(BadRequest::new(field_violations)),
            ..ErrorDetails::new()
        }
    }
Generates an [`ErrorDetails`] struct with [`BadRequest`] details and
remaining fields set to `None`.

# Examples

```
use tonic_types::{ErrorDetails, FieldViolation};

let err_details = ErrorDetails::with_bad_request(vec![
FieldViolation::new("field_1", "description 1"),
FieldViolation::new("field_2", "description 2"),
]);
```
tonic-types/src/richer_error/error_details/mod.rs