incorperated local error reporting to api