diff --git a/lambda-runtime/Cargo.toml b/lambda-runtime/Cargo.toml index d16eaedd..9fb8eb8b 100644 --- a/lambda-runtime/Cargo.toml +++ b/lambda-runtime/Cargo.toml @@ -43,5 +43,5 @@ tokio-stream = "0.1.2" lambda_runtime_api_client = { version = "0.8", path = "../lambda-runtime-api-client" } serde_path_to_error = "0.1.11" http-serde = "1.1.3" -base64 = "0.20.0" +base64 = "0.21.0" http-body = "0.4" diff --git a/lambda-runtime/src/types.rs b/lambda-runtime/src/types.rs index 27a4a9ae..2f0287ee 100644 --- a/lambda-runtime/src/types.rs +++ b/lambda-runtime/src/types.rs @@ -1,4 +1,5 @@ use crate::{Config, Error}; +use base64::prelude::*; use bytes::Bytes; use http::{HeaderMap, HeaderValue, StatusCode}; use serde::{Deserialize, Serialize}; @@ -208,7 +209,7 @@ impl ToStreamErrorTrailer for Error { fn to_tailer(&self) -> String { format!( "Lambda-Runtime-Function-Error-Type: Runtime.StreamError\r\nLambda-Runtime-Function-Error-Body: {}\r\n", - base64::encode(self.to_string()) + BASE64_STANDARD.encode(self.to_string()) ) } }