### Is there an existing issue for this?

- [X] I have searched the existing issues and read the documentation

### Question

Hello,

I am new in localstack and AWS too. I created AWS Lambda handler, which is integrated with APIGateway. This handler accepts multipart/form-data, because request has to have image in it. If request has all required data in right form and right values, which refer to some data in DynamoDB, then everything is fine, lambda returns response with 200 status code. When data are not in right form, Lambda returns response with 400 status code, but still nothing crashes. But when values stated above are not valid, specifically that values refer to other items in database, which do not exist, my lambda finds that out and returns response with 404 status code and error message in JSON form (Content-Type in header is set to JSON too). After that I see in localstack logs my "Not Found" response, so i assume that lambda successfully handled request, but then there is UnicodeDecodeError, which you can see on image. When I changed status code from 404 to 200 or even 403, I didn't get that error. What am I doing wrong?

Thank you.

![image](https://user-images.githubusercontent.com/93795128/158701029-b595d6af-7897-49a5-92dc-2c51a292a9bc.png)


### Anything else?

_No response_
response = invocation_context.response
    integration = invocation_context.integration
    int_responses = integration.get("integrationResponses") or {}
    if not int_responses:
        return response
    entries = list(int_responses.keys())
    return_code = str(response.status_code)
    if return_code not in entries:
        if len(entries) > 1:
            LOG.info("Found multiple integration response status codes: %s", entries)
            return response
        return_code = entries[0]
    response_params = int_responses[return_code].get("responseParameters", {})
    for key, value in response_params.items():
        
        if str(key).lower().startswith("method.response.header."):
            header_name = key[len("method.response.header.") :]
            response.headers[header_name] = value.strip("'")
    return response
def set_api_id_stage_invocation_path(