We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b98a041 commit df71f21Copy full SHA for df71f21
apps/backend/src/song/song-webhook/song-webhook.service.ts
@@ -48,7 +48,7 @@ export class SongWebhookService implements OnModuleInit {
48
body: JSON.stringify(webhookData),
49
});
50
51
- const data = await response.json();
+ const data = (await response.json()) as { id: string };
52
53
//this.logger.log(`Posted webhook message for song ${song.publicId}`);
54
return data.id; // Discord message ID
apps/backend/src/user/user.service.ts
@@ -32,7 +32,11 @@ export class UserService {
32
new: true, // return the updated document
33
})) as UserDocument;
34
} catch (error) {
35
- throw new Error(error);
+ if (error instanceof Error) {
36
+ throw error;
37
+ }
38
+
39
+ throw new Error(String(error));
40
}
41
42
0 commit comments