@@ -1013,16 +1013,14 @@ cb_map_error_code(const couchbase::key_value_error_context& ctx, const std::stri
1013
1013
rb_hash_aset (enhanced_error_info, rb_id2sym (rb_intern (" context" )), cb_str_new (ctx.extended_error_info ()->context ()));
1014
1014
rb_hash_aset (error_context, rb_id2sym (rb_intern (" extended_error_info" )), enhanced_error_info);
1015
1015
}
1016
- if (ctx.retry_attempts () > 0 ) {
1017
- rb_hash_aset (error_context, rb_id2sym (rb_intern (" retry_attempts" )), INT2FIX (ctx.retry_attempts ()));
1018
- if (!ctx.retry_reasons ().empty ()) {
1019
- VALUE retry_reasons = rb_ary_new_capa (static_cast <long >(ctx.retry_reasons ().size ()));
1020
- for (const auto & reason : ctx.retry_reasons ()) {
1021
- auto reason_str = fmt::format (" {}" , reason);
1022
- rb_ary_push (retry_reasons, rb_id2sym (rb_intern (reason_str.c_str ())));
1023
- }
1024
- rb_hash_aset (error_context, rb_id2sym (rb_intern (" retry_reasons" )), retry_reasons);
1025
- }
1016
+ rb_hash_aset (error_context, rb_id2sym (rb_intern (" retry_attempts" )), INT2FIX (ctx.retry_attempts ()));
1017
+ if (!ctx.retry_reasons ().empty ()) {
1018
+ VALUE retry_reasons = rb_ary_new_capa (static_cast <long >(ctx.retry_reasons ().size ()));
1019
+ for (const auto & reason : ctx.retry_reasons ()) {
1020
+ auto reason_str = fmt::format (" {}" , reason);
1021
+ rb_ary_push (retry_reasons, rb_id2sym (rb_intern (reason_str.c_str ())));
1022
+ }
1023
+ rb_hash_aset (error_context, rb_id2sym (rb_intern (" retry_reasons" )), retry_reasons);
1026
1024
}
1027
1025
if (ctx.last_dispatched_to ()) {
1028
1026
rb_hash_aset (error_context, rb_id2sym (rb_intern (" last_dispatched_to" )), cb_str_new (ctx.last_dispatched_to ().value ()));
0 commit comments