Skip to main content

rest_json_error

Function rest_json_error 

Source
pub fn rest_json_error(status: u16, code: &str, message: &str) -> MockResponse
Expand description

Create a REST-JSON error response with x-amzn-errortype header.

Used by services like SES v2, Lambda, EKS, AppConfig, etc. The error type is communicated via the x-amzn-errortype header, and the body contains Type and Message fields.