Skip to content

Commit

Permalink
updated the condition to reject with error message
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithad0703 committed Nov 14, 2024
1 parent 8868257 commit 0f4cea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export function sendRequest(queryObject, options) {
} else {
if (cachePolicy === 2 && self.provider !== null) {
self.provider.get(hashQuery, function(err, _data) {
if (err || !_data || (_data.entries && _data.entries.length === 0) || (_data.assets && _data.assets.length === 0)) {
if (err || !_data || (_data.entries.length === 0 && _data.assets.length === 0)) {
return reject({ error_code: 141, error_message: 'The requested entry doesn\'t exist.' });
}
getCacheCallback()(err, _data);
Expand Down

0 comments on commit 0f4cea7

Please sign in to comment.