Client-side exception occurs when adding a filter to rate limit logs table with no data
Preliminary Checks
-
[X] I have reviewed the documentation: https://unkey.com/docs
-
[X] I have searched for existing issues: https://github.com/unkeyed/unkey/issues
-
[X] This issue is not a question, general help request, or anything other than a bug report directly related to Unkey. Please ask questions in our Discord community: https://unkey.com/discord.
Reproduction / Replay Link (Optional)
No response
Issue Summary
When there are no rate limit logs available, clicking "Add Filter" and selecting any type of filter causes a client-side exception as soon as a character is entered into the filter input. The entire page fails, and the following error is displayed in the DevTools console: undefined is not iterable.
It is currently unclear whether this issue persists when there is at least one log entry in the table.
Observed Behavior:
- A client-side exception occurs (undefined is not iterable).
- The entire page becomes unresponsive or crashes.
- The logs table does not handle the filter input correctly.
Steps to Reproduce
- Go to the created ratelimit page
- Head over the "Logs" tab
- Ensure the rate limit logs table is empty
- Click "Add filter" and choose any filter option
- Press any character in the filter input field
Expected behavior
- If no logs are present, the filter input should be handled gracefully, and no exceptions should occur.
- The page should remain functional, even if no data matches the filter criteria.
- If the filter doesn't return any results (due to no data), an appropriate "No results found" message should be displayed without breaking the UI.
- If logs are present, the filter should work as expected, narrowing down the results without triggering any errors.
Other information
No response
Screenshots
https://github.com/user-attachments/assets/b122d175-5eda-4896-b7d0-61862842c7be
Version info
- OS:
- Node:
- npm:
I can replicate the same error in the identifier input with and without requests on the ratelimit overview page.
@Flo4604 Good catch! I've just noticed the same on my side.
/award 50
Awarding unrenamed: 50 points 🕹️ Well done! Check out your new contribution on oss.gg/unrenamed
/assign
You already have an open issue assigned to you here. Once that's closed or unassigned, only then we recommend you to take up more.
/assign
Assigned to @RajuGangitla! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀
@RajuGangitla, please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12 hours, you will be unassigned automatically.