You've already forked joplin
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:
@@ -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 : {};
|
||||
|
||||
Reference in New Issue
Block a user