@slack/web-api
Advanced tools
Comparing version 5.7.0 to 5.8.0
@@ -464,2 +464,22 @@ "use strict"; | ||
} | ||
// log warnings and errors in response metadata messages | ||
// related to https://api.slack.com/changelog/2016-09-28-response-metadata-is-on-the-way | ||
if (result.response_metadata !== undefined && result.response_metadata.messages !== undefined) { | ||
result.response_metadata.messages.forEach((msg) => { | ||
const errReg = /\[ERROR\](.*)/; | ||
const warnReg = /\[WARN\](.*)/; | ||
if (errReg.test(msg)) { | ||
const errMatch = msg.match(errReg); | ||
if (errMatch != null) { | ||
this.logger.error(errMatch[1].trim()); | ||
} | ||
} | ||
else if (warnReg.test(msg)) { | ||
const warnMatch = msg.match(warnReg); | ||
if (warnMatch != null) { | ||
this.logger.warn(warnMatch[1].trim()); | ||
} | ||
} | ||
}); | ||
} | ||
if (!result.ok) { | ||
@@ -466,0 +486,0 @@ throw errors_1.platformErrorFromResult(result); |
{ | ||
"name": "@slack/web-api", | ||
"version": "5.7.0", | ||
"version": "5.8.0", | ||
"description": "Official library for using the Slack Platform's Web API", | ||
@@ -49,3 +49,3 @@ "author": "Slack Technologies, Inc.", | ||
"@types/p-queue": "^2.3.2", | ||
"axios": "^0.18.0", | ||
"axios": "^0.19.0", | ||
"eventemitter3": "^3.1.0", | ||
@@ -52,0 +52,0 @@ "form-data": "^2.5.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
178216
2388
+ Addedaxios@0.19.2(transitive)
- Removedaxios@0.18.1(transitive)
- Removedis-buffer@2.0.5(transitive)
Updatedaxios@^0.19.0