From 72a81a5837e117a9e3e726b34e69cf1e911c04d3 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Thu, 26 Sep 2019 16:33:34 +0200 Subject: [PATCH] #288 #457 Include the error message in the documentation so that it is searchable --- docs/runtimes/http.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/runtimes/http.md b/docs/runtimes/http.md index b797746bc..d1a67feed 100644 --- a/docs/runtimes/http.md +++ b/docs/runtimes/http.md @@ -128,7 +128,7 @@ provider: This will make API Gateway support binary responses for all responses. Your application can now return binary responses as usual. -**However, you must define a `Content-Type` header on binary responses.** If you use [Symfony's helpers](https://symfony.com/doc/current/components/http_foundation.html#serving-files) or [Laravel's helpers](https://laravel.com/docs/5.8/responses#file-downloads) for file downloads, then you don't need to do anything. If you don't, here are some examples: +**However, you must define a `Content-Type` header on binary responses.** If you don't, you may get the following error: *Failed encoding Lambda JSON response: Malformed UTF-8 characters, possibly incorrectly encoded*. [Symfony's helpers](https://symfony.com/doc/current/components/http_foundation.html#serving-files) or [Laravel's helpers](https://laravel.com/docs/5.8/responses#file-downloads) will take care of that for you. If you don't use them, here are some examples: ```php // Vanilla PHP example with a JPEG image response: