Skip to content

Commit 5cf5d6d

Browse files
authored
Fix returned pagination param for alert_class_list (#8678)
Currently the `alert_receiver_list` endpoint will return a String as its pagination parameter, serialized as `{"v":"v1","page_start":"probe"}`. However, this endpoint is expecting a `AlertClassPage` struct in its query parameters, causing clients that use the returned pagination token in their subsequent request to fail with error "failed to parse pagination token: corrupted token". To resolve this, set the page selector to return the expected `AlertClassPage` instead. Closes #8660
1 parent 6570fc6 commit 5cf5d6d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nexus/src/external_api/http_entrypoints.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8192,7 +8192,9 @@ impl NexusExternalApi for NexusExternalApiImpl {
81928192
Ok(HttpResponseOk(ResultsPage::new(
81938193
alert_classes,
81948194
&EmptyScanParams {},
8195-
|class: &views::AlertClass, _| class.name.clone(),
8195+
|class: &views::AlertClass, _| params::AlertClassPage {
8196+
last_seen: class.name.clone(),
8197+
},
81968198
)?))
81978199
};
81988200
apictx

0 commit comments

Comments
 (0)