improve vapi json parser error handling