From b1aa594a80e3af13ad22f9c97eab346f36242222 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Tue, 14 Apr 2020 11:43:46 -0400 Subject: [PATCH] Handle Potential Promise Rejection in Serverless (#11882) --- packages/next/build/webpack/loaders/next-serverless-loader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/build/webpack/loaders/next-serverless-loader.ts b/packages/next/build/webpack/loaders/next-serverless-loader.ts index a496f6a850419..7b5d3ab3ca852 100644 --- a/packages/next/build/webpack/loaders/next-serverless-loader.ts +++ b/packages/next/build/webpack/loaders/next-serverless-loader.ts @@ -177,7 +177,7 @@ const nextServerlessLoader: loader.Loader = function() { } const resolver = require('${absolutePagePath}') - apiResolver( + await apiResolver( req, res, Object.assign({}, parsedUrl.query, params ),