1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Chore: Improve error message when data API cannot parse a note

This commit is contained in:
Laurent Cozic
2025-02-24 16:51:24 +00:00
parent 4fcb250c27
commit d0e16c0878

View File

@@ -491,6 +491,8 @@ export default async function(request: Request, id: string = null, link: string
const requestId = Date.now();
const requestNote = JSON.parse(request.body);
if (!requestNote) throw new Error(`Could not parse note body: ${request.body}`);
// const allowFileProtocolImages = urlUtils.urlProtocol(requestNote.base_url).toLowerCase() === 'file:';
const imageSizes = requestNote.image_sizes ? requestNote.image_sizes : {};