Handle broken links better

This commit is contained in:
Jonathan Cremin 2019-03-11 23:26:54 +00:00
parent b5f99b217a
commit 3abe8f1a79
4 changed files with 93 additions and 70 deletions

View file

@ -91,7 +91,9 @@ export async function lookupId(id, type) {
},
});
}
return Promise.reject(new Error());
const error = new Error('Not Found');
error.status = 404;
return Promise.reject(error);
}
export async function search(data, original = {}) {