docs: improve API rate-limit error handling in table-http-example #22776
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are currently three issues with the
table-http-example
:If a user hits the rate limit within this example, an overlay
will be displayed mentioning the rate limit issue. This overlay
intends to overlap the whole table, except for the paginator. Right
now this is broken as there is a minium height throwing off the
assumption that the paginator is at the bottom of the example.
If a user hits the rate limit, the paginator length is reset to
zero. This means that the user is unable to trigger new requests
as the previous/next page buttons become disabled.
Due to incorrect error handling, the observable will be
replaced by a new one that will always return an empty list.
The rate limit/API errors should be caught within the switch
map to not prevent future API requests on errors.
Updated StackBlitz: https://stackblitz.com/edit/angular-vf4jjs?file=src/app/table-http-example.ts
Fixes #11547.