pub fn internal_error(source: Box<dyn error::Error>) -> Self {
        Self {
            status_code: 500,
            message: "An internal error occurred".to_string(),
            source: Some(source),
        }
    }
/// Create a new ErrorResponse that does not expose the underlaying error
///
/// # Arguments
///
/// * `source` - Underlaying internal error
///
/// # Examples
/// ```
/// use crate::grid_sdk::rest_api::resources::error::ErrorResponse;
///
/// // Mock an internal error
/// let error = "NaN".parse::<u32>().unwrap_err();
///
/// let response = ErrorResponse::internal_error(Box::new(error));
///
/// assert_eq!(500, response.status_code());
/// assert_eq!("An internal error occurred", response.message());
/// ```
Create a new ErrorResponse that does not expose the underlaying error
Create a new ErrorResponse that does not expose the underlaying error
pub fn internal_error(source: Box<dyn error::Error>) -> Self {
        Self {
            status_code: 500,
            message: "An internal error occurred".to_string(),
            source: Some(source),
        }
    }
pub fn internal_error ( source : Box < dyn error :: Error > ) -> Self { Self { status_code : 500 , message : " " . to_string ( ) , source : Some ( source ) , } }
Create a new ErrorResponse that does not expose the underlaying error
Create a new ErrorResponse that does not expose the underlaying error
source
Box<dyn error::Error>
examples
```
use crate::grid_sdk::rest_api::resources::error::ErrorResponse.

Mock an internal error
let error = "NaN".parse::().unwrap_err().

let response = ErrorResponse::internal_error(Box::new(error)).

assert_eq!(500, response.status_code());
assert_eq!("An internal error occurred", response.message());
```
` ` ` use crate :: grid_sdk :: rest_api :: resources :: error :: ErrorResponse . Mock an internal error let error = " NaN " . parse :: () . unwrap_err () . let response = ErrorResponse :: internal_error ( Box :: new ( error )) . assert_eq! ( 500 response . status_code () ) ; assert_eq! ( " An internal error occurred " response . message () ) ; ` ` `