There seems to be code for handling errors from the API, but that code is essentially unreachable. This results in the message "No results found" being shown even when the API responds with a 403. This can be confusing for the users when they are searching for a valid username but seeing this message on the screen.
Screenshots
Additional Context
Suggesstion
When the rate limit is breached, the API responds with the epoch time at which we can start making requests again. This is under the "x-ratelimit-reset" header. This can be used to convey to the user the actual problem, and how soon can they start making requests again. This would be much better than showing the message "No results found" for a perfectly valid username.
@sadanandpai @arpansaha13 Let me know if this issue is open-worthy, and if this feature can add value to the project. I have some commits ready and I can create a PR asap.
Framework/code-stack
React
Scope
Autocomplete (online)
Description
Why better error handling
Screenshots
Additional Context
Suggesstion
When the rate limit is breached, the API responds with the epoch time at which we can start making requests again. This is under the "x-ratelimit-reset" header. This can be used to convey to the user the actual problem, and how soon can they start making requests again. This would be much better than showing the message "No results found" for a perfectly valid username.