Fix error when handling error federating post
This commit is contained in:
parent
bc32616dee
commit
e831ef285f
|
@ -135,9 +135,11 @@ export async function signAndSend(activity: Activity, inbox: string) {
|
||||||
body: activity
|
body: activity
|
||||||
}, (err, res) => {
|
}, (err, res) => {
|
||||||
console.log("Sent message to inbox at", targetDomain);
|
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 (err) console.log("Error:", err, res);
|
||||||
|
if (res) {
|
||||||
|
console.log("Response status code", res.statusCode);
|
||||||
|
console.log(res.body);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue