fedimbed: fix returned errors being objects

This commit is contained in:
Cynthia Foxwell 2022-12-31 12:55:26 -07:00
parent 9609b39e7f
commit f96ee62da7

View file

@ -99,7 +99,7 @@ async function processUrl(msg, url) {
if (!postData) {
// We failed to get post.
// Assume it was due to AFM and use MastoAPI
// Assume it was due to AFM or forced HTTP signatures and use MastoAPI
// Follow redirect from /object since we need the ID from /notice
if (PATH_REGEX.pleroma.test(urlObj.pathname)) {
@ -176,7 +176,7 @@ async function processUrl(msg, url) {
} else if (postData2.error) {
logger.error(
"fedimbed",
`Bailing trying to re-embed "${url}", MastoAPI gave us error: ${postData2.error}`
`Bailing trying to re-embed "${url}", MastoAPI gave us error: ${JSON.stringify(postData2.error)}`
);
} else {
cw =