Skip to content

Commit f1bcf11

Browse files
ADD: New error code for slow reader catchup
1 parent 9302295 commit f1bcf11

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.49.0 - TBD
4+
- Added `SkippedRecordsAfterSlowReading` to the `ErrorCode` enum for gateway errors originating
5+
from slow client catch-up.
6+
37
## 0.48.0 - 2026-02-18
48

59
### Enhancements

include/databento/enums.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,9 @@ enum ErrorCode : std::uint8_t {
632632
InvalidSubscription = 5,
633633
// An error occurred in the gateway.
634634
InternalError = 6,
635+
// A slow client was detected and records were skipped by the gateway to allow
636+
// catching up.
637+
SkippedRecordsAfterSlowReading = 7,
635638
// No error code was specified or this record was upgraded from a version 1 struct
636639
// where the code field didn't exist.
637640
Unset = 255,

src/enums.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,9 @@ const char* ToString(ErrorCode error_code) {
802802
case ErrorCode::InternalError: {
803803
return "internal_error";
804804
}
805+
case ErrorCode::SkippedRecordsAfterSlowReading: {
806+
return "skipped_records_after_slow_reading";
807+
}
805808
case ErrorCode::Unset: {
806809
return "unset";
807810
}
@@ -1256,6 +1259,9 @@ ErrorCode FromString(const std::string& str) {
12561259
if (str == "internal_error") {
12571260
return ErrorCode::InternalError;
12581261
}
1262+
if (str == "skipped_records_after_slow_reading") {
1263+
return ErrorCode::SkippedRecordsAfterSlowReading;
1264+
}
12591265
if (str == "unset") {
12601266
return ErrorCode::Unset;
12611267
}

0 commit comments

Comments
 (0)