Fix error when handling error federating post

This commit is contained in:
Shadowfacts 2020-11-11 11:47:23 -05:00
parent bc32616dee
commit e831ef285f
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 4 additions and 2 deletions

View File

@ -135,9 +135,11 @@ export async function signAndSend(activity: Activity, inbox: string) {
body: activity
}, (err, res) => {
console.log("Sent message to inbox at", targetDomain);
console.log("Response status code", res.statusCode);
console.log(res.body);
if (err) console.log("Error:", err, res);
if (res) {
console.log("Response status code", res.statusCode);
console.log(res.body);
}
});
}