support returning an error