Convert null to NotFoundError for remoting call to DataAccessObject.findOne.
This commit is contained in:
parent
c355c99cbd
commit
4fd3c969f9
|
@ -767,7 +767,8 @@ setRemoting(DataAccessObject.findOne, {
|
||||||
description: 'Find first instance of the model matched by filter from the data source',
|
description: 'Find first instance of the model matched by filter from the data source',
|
||||||
accepts: {arg: 'filter', type: 'object', description: 'Filter defining fields, where, orderBy, offset, and limit'},
|
accepts: {arg: 'filter', type: 'object', description: 'Filter defining fields, where, orderBy, offset, and limit'},
|
||||||
returns: {arg: 'data', type: 'object', root: true},
|
returns: {arg: 'data', type: 'object', root: true},
|
||||||
http: {verb: 'get', path: '/findOne'}
|
http: {verb: 'get', path: '/findOne'},
|
||||||
|
rest: {after: convertNullToNotFoundError}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue