Remove TestErrorReporter. Removes duplicated function

Remove toError() and reject error directly