Compare commits

...

2 Commits

Author SHA1 Message Date
gauthier-th
99c06f1158 fix: add more logs to debug discord notifications 2025-02-10 21:59:17 +01:00
gauthier-th
ffe5154ca0 chore: update to pnpm v10 2025-02-10 21:56:33 +01:00
9 changed files with 27 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ jobs:
- name: Pnpm Setup
uses: pnpm/action-setup@v4
with:
version: 9
version: 10
- name: Get pnpm store directory
shell: sh
run: |

View File

@@ -21,7 +21,7 @@ jobs:
- name: Pnpm Setup
uses: pnpm/action-setup@v4
with:
version: 9
version: 10
- name: Cypress run
uses: cypress-io/github-action@v6
with:

View File

@@ -25,7 +25,7 @@ jobs:
- name: Pnpm Setup
uses: pnpm/action-setup@v4
with:
version: 9
version: 10
- name: Get pnpm store directory
shell: sh

View File

@@ -12,6 +12,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Pnpm Setup
uses: pnpm/action-setup@v4
with:
version: 10
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

View File

@@ -35,7 +35,7 @@ jobs:
- name: Pnpm Setup
uses: pnpm/action-setup@v4
with:
version: 9
version: 10
- name: Get pnpm store directory
shell: sh
run: |

View File

@@ -25,7 +25,7 @@ jobs:
- name: Pnpm Setup
uses: pnpm/action-setup@v4
with:
version: 9
version: 10
- name: Get pnpm store directory
shell: sh
@@ -42,7 +42,7 @@ jobs:
- name: Install dependencies
run: |
cd gen-docs
cd gen-docs
pnpm install --frozen-lockfile
- name: Build website

View File

@@ -15,7 +15,7 @@ import TabItem from '@theme/TabItem';
### Prerequisites
- [Node.js 22.x](https://nodejs.org/en/download/)
- [Pnpm 9.x](https://pnpm.io/installation)
- [Pnpm 10.x](https://pnpm.io/installation)
- [Git](https://git-scm.com/downloads)
## Unix (Linux, macOS)

View File

@@ -172,7 +172,7 @@
},
"engines": {
"node": "^22.0.0",
"pnpm": "^9.0.0"
"pnpm": "^10.0.0"
},
"overrides": {
"sqlite3/node-gyp": "8.4.1",

View File

@@ -295,6 +295,14 @@ class DiscordAgent
userMentions.push(`<@&${settings.options.webhookRoleId}>`);
}
logger.debug('Discord notification details', {
username: settings.options.botUsername
? settings.options.botUsername
: getSettings().main.applicationTitle,
avatar_url: settings.options.botAvatarUrl,
embeds: [this.buildEmbed(type, payload)],
content: userMentions.join(' '),
});
const response = await fetch(settings.options.webhookUrl, {
method: 'POST',
headers: {
@@ -310,6 +318,12 @@ class DiscordAgent
} as DiscordWebhookPayload),
});
if (!response.ok) {
logger.debug('Error sending Discord notification, response not ok', {
label: 'Notifications',
type: Notification[type],
subject: payload.subject,
response: response.statusText,
});
throw new Error(response.statusText, { cause: response });
}
@@ -328,6 +342,7 @@ class DiscordAgent
subject: payload.subject,
errorMessage: e.message,
response: errorData,
stack: e.stack,
});
return false;