fix response nil bug for error handling
fix status as nil bug