You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if you set limit to > 1000 (hardcoded for now), you will get back a RPC error message saying Pagination Error. Only one pagination parameter supported per query.. For a better user experience, this error message should be specific for the pagination limit.
The text was updated successfully, but these errors were encountered:
Yes, I agree that the error message you are getting is not very helpful. One way to improve the user experience would be to add a custom error message that specifically mentions the pagination limit.
You can do this by catching the error that is thrown when the limit is exceeded and then throwing a new error with a more specific message. Here's an example of how you can do this in JavaScript:
try{// make API call with pagination limit > 1000}catch(error){if(error.message.includes('Pagination Error')&&error.message.includes('limit')){thrownewError('Pagination limit exceeded. Please set limit to 1000 or less.');}else{// handle other errors}}
This code checks if the error message contains both the words "Pagination Error" and "limit". If it does, it throws a new error with a more specific message. Otherwise, it handles the error in some other way.
You can customize the error message to suit your needs.
muhitrhn
pushed a commit
to muhitrhn/digital-asset-rpc-infrastructure
that referenced
this issue
Oct 6, 2023
Currently, if you set
limit
to > 1000 (hardcoded for now), you will get back a RPC error message sayingPagination Error. Only one pagination parameter supported per query.
. For a better user experience, this error message should be specific for the pagination limit.The text was updated successfully, but these errors were encountered: