Skip to content

Commit

Permalink
Api: Fixes laurent22#2018: Fixed error handling when getting resource…
Browse files Browse the repository at this point in the history
…s of a note that does not exist
  • Loading branch information
laurent22 authored and scoroi committed Nov 10, 2019
1 parent 0ab5c99 commit ecd7086
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ReactNativeClient/lib/services/rest/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ class Api {
return Tag.tagsByNoteId(id);
} else if (link && link === 'resources') {
const note = await Note.load(id);
if (!note) throw new ErrorNotFound();
const resourceIds = await Note.linkedResourceIds(note.body);
const output = [];
const loadOptions = this.defaultLoadOptions_(request);
Expand Down

0 comments on commit ecd7086

Please sign in to comment.