Uploaded image for project: 'C++ Couchbase Client'
  1. C++ Couchbase Client
  2. CXXCBC-457

Converting errors to transaction_op_error_context loses data for error validation

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Major
    • None
    • None
    • transactions
    • None
    • 0

    Description

      Background; FIT requires that the performer does error validation, which is different depending on if the error returned is a TransactionOperationFailed, or something else (e.g. DocAlreadyExists from ctx.insert()).

      Currently in C++ every error returned at this stage is converted into a transaction_op_error_context, containing the error_code and optionally a key_value/query error_context, if the error is a non-transaction error.

      Converting the error into a transaction_op_error_context results in some data being lost from the underlying error (e.g. rollback, retry & the to_raise). One approach would be to simply add the these fields into the transaction_op_error_context (perhaps as internal fields), however, the general SDK approach of having specific error_context types etc., and them being returned in each operation is currently being discussed, and may affect how this issue is solved.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              matt.wozakowski Matt Wozakowski
              matt.wozakowski Matt Wozakowski
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes