Skip to content

Commit

Permalink
Repo Gardening: fix Slack error check logic (#40414)
Browse files Browse the repository at this point in the history
See Automattic/jetpack#40369 (comment)

Co-authored-by: anomiex <anomiex@users.noreply.github.com>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12123961622

Upstream-Ref: Automattic/jetpack@30b1275
  • Loading branch information
jeherve authored and matticbot committed Dec 2, 2024
1 parent 33908cd commit fa74c5b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52881,7 +52881,7 @@ async function sendSlackMessage( message, channel, payload, customMessageFormat
} catch ( error ) {
// The request failed.
// At this point, we want to log specific types of errors (let's avoid noise by logging temporary errors for example).
if ( ! error.code === ErrorCode.PlatformError ) {
if ( error.code !== ErrorCode.PlatformError ) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/utils/slack/send-slack-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async function sendSlackMessage( message, channel, payload, customMessageFormat
} catch ( error ) {
// The request failed.
// At this point, we want to log specific types of errors (let's avoid noise by logging temporary errors for example).
if ( ! error.code === ErrorCode.PlatformError ) {
if ( error.code !== ErrorCode.PlatformError ) {
return false;
}

Expand Down

0 comments on commit fa74c5b

Please sign in to comment.