improve handling of non-string (=non-compliant) error responses