on error return tuple instead of dict