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

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);
} }
}); });