Optimized server error display handling when consuming a recipe (closes #2310)

This commit is contained in:
Bernd Bestel
2023-08-15 18:51:40 +02:00
parent a123535b0a
commit a965d01fb9
3 changed files with 2 additions and 7 deletions

View File

@@ -906,9 +906,8 @@ $(document).on('click', '.recipe-consume-button', function(e)
},
function(xhr)
{
toastr.warning(__t('Not all ingredients of recipe "%s" are in stock, nothing removed', objectName));
Grocy.FrontendHelpers.EndUiBusy();
console.error(xhr);
Grocy.FrontendHelpers.ShowGenericError("A server error occured while processing your request", xhr.response);
}
);
}