Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
e3402fed65
Adding env var to show version is local
All checks were successful
ci/woodpecker/manual/test Pipeline was successful
ci/woodpecker/manual/deploy Pipeline was successful
2026-04-20 09:16:01 +02:00
7fe76186c7 Adding better error logs for ntfy client
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
2026-04-19 22:45:54 +02:00
2 changed files with 7 additions and 3 deletions

View file

@ -41,7 +41,7 @@ export class NtfyClient {
throw new Error(`${response.status} - ${response.statusText}`) throw new Error(`${response.status} - ${response.statusText}`)
} }
} catch (error: unknown) { } catch (error: unknown) {
this.loggerService.error('ntfy client failed', { error }) this.loggerService.error('ntfy client failed', { error: error instanceof Error ? error.message : JSON.stringify(error) })
} }
} }
} }

View file

@ -60,11 +60,15 @@ export class NtfyProvider implements OnApplicationBootstrap {
} }
async sendBootstrappedNotification() { async sendBootstrappedNotification() {
const gitCommit = this.configService.get<string>('GIT_COMMIT') const version =
this.configService.get<string>('GIT_COMMIT') ??
this.configService.get('LOCAL') === 'true'
? 'LOCAL'
: 'unknown'
await this.publishQueue.add( await this.publishQueue.add(
...NtfyProvider.defaultJob({ ...NtfyProvider.defaultJob({
title: 'Autobaan up and running', title: 'Autobaan up and running',
message: `Version ${gitCommit}`, message: `Version ${version}`,
tags: [MessageTags.badminton], tags: [MessageTags.badminton],
}), }),
) )