mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
feat(federation): ✨ Use instance messaging to send errors to remote instance
This commit is contained in:
parent
a037448ebb
commit
49a301663a
|
|
@ -132,6 +132,20 @@ export const getInboxWorker = (): Worker<InboxJobData, void, InboxJobType> =>
|
|||
|
||||
await job.log(`Failed processing entity [${data.id}]`);
|
||||
|
||||
await job.log(
|
||||
`Sending error message to instance [${remoteInstance.data.baseUrl}]`,
|
||||
);
|
||||
|
||||
await remoteInstance.sendMessage(
|
||||
`Failed processing entity [${data.uri}] delivered to inbox. Returned error:\n\n${JSON.stringify(
|
||||
error,
|
||||
null,
|
||||
4,
|
||||
)}`,
|
||||
);
|
||||
|
||||
await job.log("Message sent");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue