From 7553e35db3a4331249079a4a826de2aa7cb0be24 Mon Sep 17 00:00:00 2001 From: Eugeniy Burmistrov <37070809+EugeniyBurmistrov@users.noreply.github.com> Date: Thu, 21 Apr 2022 14:47:45 +0300 Subject: [PATCH] Fix bad grammar in the fail handler error message (#2271) --- .../runtime/runtimes/runtime-aws-serverless/test/index.test.ts | 2 +- .../runtime/runtimes/runtime-base/src/handlers/fail-handler.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime/runtimes/runtime-aws-serverless/test/index.test.ts b/packages/runtime/runtimes/runtime-aws-serverless/test/index.test.ts index a55b8df08c..4093a1a41d 100644 --- a/packages/runtime/runtimes/runtime-aws-serverless/test/index.test.ts +++ b/packages/runtime/runtimes/runtime-aws-serverless/test/index.test.ts @@ -205,7 +205,7 @@ describe('runtime', () => { expect(result).toEqual({ statusCode: 405, headers: {}, - body: 'GET "/": handler not exist', + body: 'GET "/": handler does not exist', }) }) diff --git a/packages/runtime/runtimes/runtime-base/src/handlers/fail-handler.ts b/packages/runtime/runtimes/runtime-base/src/handlers/fail-handler.ts index 68da5694b4..20d941ca1f 100644 --- a/packages/runtime/runtimes/runtime-base/src/handlers/fail-handler.ts +++ b/packages/runtime/runtimes/runtime-base/src/handlers/fail-handler.ts @@ -7,7 +7,7 @@ export const failHandler = async ( { method, path }: ResolveRequest, res: ResolveResponse ) => { - const errorText = `${method} "${path}": handler not exist` + const errorText = `${method} "${path}": handler does not exist` await res.status(405) await res.end(errorText) log.warn(errorText)