aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/core
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/core')
-rw-r--r--bridge/core/export.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/bridge/core/export.go b/bridge/core/export.go
index fa531c5f..6e0612fa 100644
--- a/bridge/core/export.go
+++ b/bridge/core/export.go
@@ -31,6 +31,9 @@ const (
// but not severe enough to consider the export a failure.
ExportEventWarning
+ // The export system (web API) has reached a rate limit
+ ExportEventRateLimiting
+
// Error happened during export
ExportEventError
)
@@ -74,6 +77,8 @@ func (er ExportResult) String() string {
return fmt.Sprintf("warning at %s: %s", er.ID, er.Err.Error())
}
return fmt.Sprintf("warning: %s", er.Err.Error())
+ case ExportEventRateLimiting:
+ return fmt.Sprintf("rate limiting: %s", er.Reason)
default:
panic("unknown export result")
@@ -145,3 +150,10 @@ func NewExportTitleEdition(id entity.Id) ExportResult {
Event: ExportEventTitleEdition,
}
}
+
+func NewExportRateLimiting(msg string) ExportResult {
+ return ExportResult{
+ Reason: msg,
+ Event: ExportEventRateLimiting,
+ }
+}