Adds error handling for new error codes