backend error handling
front end error handling (incomplete)