Skip to content

Commit

Permalink
Merge pull request #16 from georust/fix-collections-test
Browse files Browse the repository at this point in the history
Prevent loop on error
  • Loading branch information
b4l authored Nov 6, 2022
2 parents 4397542 + ec27c89 commit 3284f63
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ogcapi-client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,11 @@ impl Pagination<Collection> for Collections {
Ok(None)
}
}
Err(err) => Err(err),
Err(err) => {
// reset links to prevent loop
self.links = Vec::new();
Err(err)
}
}
} else {
Ok(None)
Expand All @@ -350,7 +354,11 @@ impl Pagination<Feature> for Items {
Ok(None)
}
}
Err(err) => Err(err),
Err(err) => {
// reset links to prevent loop
self.links = Vec::new();
Err(err)
}
}
} else {
Ok(None)
Expand Down

0 comments on commit 3284f63

Please sign in to comment.