test: enable error logs for media

This commit is contained in:
Mar0xy 2023-09-25 18:35:52 +02:00
parent 35f3f9e078
commit 2bda4f1768
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828

View file

@ -143,7 +143,7 @@ export class MastodonApiServerService {
const data = await client.uploadMedia(multipartData); const data = await client.uploadMedia(multipartData);
reply.send(convertAttachment(data.data as Entity.Attachment)); reply.send(convertAttachment(data.data as Entity.Attachment));
} catch (e: any) { } catch (e: any) {
/* console.error(e); */ console.error(e);
reply.code(401).send(e.response.data); reply.code(401).send(e.response.data);
} }
}); });
@ -158,10 +158,11 @@ export class MastodonApiServerService {
reply.code(401).send({ error: 'No image' }); reply.code(401).send({ error: 'No image' });
return; return;
} }
console.error(_request.body);
const data = await client.uploadMedia(multipartData, _request.body!); const data = await client.uploadMedia(multipartData, _request.body!);
reply.send(convertAttachment(data.data as Entity.Attachment)); reply.send(convertAttachment(data.data as Entity.Attachment));
} catch (e: any) { } catch (e: any) {
/* console.error(e); */ console.error(e);
reply.code(401).send(e.response.data); reply.code(401).send(e.response.data);
} }
}); });