@slack/bolt
Advanced tools
Comparing version 3.15.0 to 3.16.0
@@ -172,2 +172,8 @@ "use strict"; | ||
const { error, response, logger, storedResponse } = args; | ||
// Check if the response headers have already been sent | ||
if (response.headersSent) { | ||
logger.error('An unhandled error occurred after ack() called in a listener'); | ||
logger.debug(`Error details: ${error}, storedResponse: ${storedResponse}`); | ||
return false; | ||
} | ||
if ('code' in error) { | ||
@@ -193,5 +199,11 @@ // CodedError has code: string | ||
static defaultUnhandledRequestHandler(args) { | ||
const { logger } = args; | ||
const { logger, response } = args; | ||
logger.error('An incoming event was not acknowledged within 3 seconds. ' + | ||
'Ensure that the ack() argument is called in a listener.'); | ||
// Check if the response has already been sent | ||
if (!response.headersSent) { | ||
// If not, set the status code and end the response to close the connection | ||
response.writeHead(404); // Not Found | ||
response.end(); | ||
} | ||
} | ||
@@ -198,0 +210,0 @@ } |
{ | ||
"name": "@slack/bolt", | ||
"version": "3.15.0", | ||
"version": "3.16.0", | ||
"description": "A framework for building Slack apps, fast.", | ||
@@ -62,3 +62,3 @@ "author": "Slack Technologies, LLC", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "20.9.0", | ||
"@types/node": "20.10.0", | ||
"@types/sinon": "^7.0.11", | ||
@@ -65,0 +65,0 @@ "@typescript-eslint/eslint-plugin": "^4.4.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
523725
7461