add error handling/display on frontend