0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00

Add owner info to missing Google file message

This commit is contained in:
G.Ambatte
2023-06-26 17:43:19 +12:00
parent cff4f8eae5
commit c5f4793c23
2 changed files with 3 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ const api = {
// Throw any error caught while attempting to retrieve Google brew.
if(googleError) {
const reason = googleError.errors[0].reason;
throw { ...googleError, HBErrorCode: reason == 'notFound' ? '02' : '01' };
throw { ...googleError, HBErrorCode: reason == 'notFound' ? '02' : '01', authors: stub?.authors };
}
// Combine the Homebrewery stub with the google brew, or if the stub doesn't exist just use the google brew
stub = stub ? _.assign({ ...api.excludeStubProps(stub), stubbed: true }, api.excludeGoogleProps(googleBrew)) : googleBrew;