1 2 3 4 5 6 7 8 9 10 11
use edgedb_errors::Error; use crate::server_message::ErrorResponse; impl From<ErrorResponse> for Error { fn from(val: ErrorResponse) -> Self { Error::from_code(val.code) .context(val.message) .with_headers(val.attributes) } }