From: Patrick Steinhardt Date: Wed, 22 Apr 2026 11:15:35 GMT Subject: Re: [PATCH 3/8] refs: return `ref_transaction_error` from `ref_transaction_update()` Message-ID: In-Reply-To: <20260420-refs-move-to-generic-layer-v1-3-513e354f376b@gmail.com> On Mon, Apr 20, 2026 at 12:12:01PM +0200, Karthik Nayak wrote: > The `ref_transaction_update()` function is used to add updates to a > given reference transactions. In the following commit, we'll add more > validation to this function. As such, it would be more beneficial if the s/more beneficial/beneficial/ > function returns specific error types, so callers can differentiate > between different errors. > > To facilitate this, return `enum ref_transaction_error` from the > function and covert the existing '-1' returns to > 'REF_TRANSACTION_ERROR_GENERIC'. Since this retains the existing > behavior, no changes are made to any of the callers but this sets the > necessary infrastructure for introduction of other errors. Yup, makes sense. This doesn't buy us anything yet, but will eventually. Patrick