Bug fixed

apiError.toString() may produce NPE