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
1 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ async function processUrl(msg, url) {
if (!postData) { if (!postData) {
// We failed to get post. // 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 // Follow redirect from /object since we need the ID from /notice
if (PATH_REGEX.pleroma.test(urlObj.pathname)) { if (PATH_REGEX.pleroma.test(urlObj.pathname)) {
@ -176,7 +176,7 @@ async function processUrl(msg, url) {
} else if (postData2.error) { } else if (postData2.error) {
logger.error( logger.error(
"fedimbed", "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 { } else {
cw = cw =