Skip to content

Conversation

@wkevwang
Copy link

@wkevwang wkevwang commented Jul 13, 2016

Regarding issue #2052

Fixes issue in endpoint controller - when handleEntityNotFound returns null if the entity is not found, it causes saveUpdates to throw an error since updated.save() is called on null. This will result in a 500 response when the entity is not found, instead of the expected 404.

Wrapping saveUpdates in if(entity) will make it return with undefined when the entity is null, which solves the issue.

@Awk34 Awk34 added the V3 label Sep 13, 2016
Awk34 pushed a commit that referenced this pull request Sep 13, 2016
@Awk34 Awk34 closed this Sep 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants