title: Getting Invalid mapping expression specified when setting GatewayResponse
body: <p>The default API Gateway responses come in this form: <code>{&quot;message&quot;:$context.error.messageString}</code>.
  Changing this template via the console, to add wrap it in an <code>&quot;error&quot;</code> object for example, works fine. However, when I try it in CDK, it errors during deployment with <code>Invalid mapping expression specified</code></p>
  <p><strong>Code</strong> (<em>notice this is literally the default template</em>):</p>
  <pre class="lang-js prettyprint-override"><code>webServiceApi.addGatewayResponse('4XX', {
     type: apigw.ResponseType.DEFAULT_4XX,
     responseHeaders: COMMON_HEADERS,
     templates: {
        'application/json': '{&quot;message&quot;:$context.error.messageString}',
     },
  });
  </code></pre>
  <p>This happens with any change as well including all the AWS-written examples I could find. It's under-documented everywhere in AWS: CDK, SDK, API Gateway and CloudFormation so it's very difficult for me to figure out what's wrong there?</p>
  <p><strong>CloudFormation Error</strong></p>
  <pre><code>Resource handler returned message: &quot;Invalid mapping expression specified: Validation Result: warnings : [], errors : [Invalid mapping expression specified: *] (Service: ApiGateway, Status Code: 400, Request ID: [TRUNCATED], Extended Request ID: null)&quot; (RequestToken: [TRUNCATED], HandlerErrorCode: InvalidRequest)
  </code></pre>