Replaces the axios dependency with Node's built-in fetch in the two webhook utilities:
src/utils/message.js
src/utils/webhook.js
Why
axios was required by both files but was never declared in package.json, so npm install never installed it and the app crashed on startup:
Error: Cannot find module 'axios'
at .../src/utils/message.js:1
Rather than add the missing dependency, both webhook POST calls now use Node's built-in fetch (available since Node 18; this project runs on 22.12), dropping the dependency entirely.
Notes for reviewer
Behavior preserved: JSON body + Content-Type: application/json header.
An explicit response.ok check reproduces axios's throw-on-non-2xx semantics (fetch does not throw on HTTP errors).
message.js previously returned response.data; it now returns parsed JSON, with a text fallback when the webhook does not respond with JSON.
## What
Replaces the `axios` dependency with Node's built-in `fetch` in the two webhook utilities:
- `src/utils/message.js`
- `src/utils/webhook.js`
## Why
`axios` was `require`d by both files but was **never declared in `package.json`**, so `npm install` never installed it and the app crashed on startup:
```
Error: Cannot find module 'axios'
at .../src/utils/message.js:1
```
Rather than add the missing dependency, both webhook POST calls now use Node's built-in `fetch` (available since Node 18; this project runs on 22.12), dropping the dependency entirely.
## Notes for reviewer
- Behavior preserved: JSON body + `Content-Type: application/json` header.
- An explicit `response.ok` check reproduces axios's throw-on-non-2xx semantics (`fetch` does not throw on HTTP errors).
- `message.js` previously returned `response.data`; it now returns parsed JSON, with a text fallback when the webhook does not respond with JSON.
- No remaining references to axios in the codebase.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
axios was required by src/utils/message.js and src/utils/webhook.js but was
never declared in package.json, so `npm install` never fetched it and the app
crashed on startup with MODULE_NOT_FOUND.
Switch both webhook POST calls to Node's built-in fetch (available since
Node 18; running on 22.12), removing the missing dependency entirely.
Behavior is preserved: JSON body with Content-Type header, and an explicit
response.ok check to keep axios's throw-on-non-2xx semantics. message.js now
returns parsed JSON (or text fallback) in place of axios's response.data.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
Replaces the
axiosdependency with Node's built-infetchin the two webhook utilities:src/utils/message.jssrc/utils/webhook.jsWhy
axioswasrequired by both files but was never declared inpackage.json, sonpm installnever installed it and the app crashed on startup:Rather than add the missing dependency, both webhook POST calls now use Node's built-in
fetch(available since Node 18; this project runs on 22.12), dropping the dependency entirely.Notes for reviewer
Content-Type: application/jsonheader.response.okcheck reproduces axios's throw-on-non-2xx semantics (fetchdoes not throw on HTTP errors).message.jspreviously returnedresponse.data; it now returns parsed JSON, with a text fallback when the webhook does not respond with JSON.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.