This is a good point. In this case, you would want to make sure that the async functions you're calling (e.g. GetAllStates()) are catching and handling their own errors. Another option is to use Promise.allSettled() which will return objects that have a status of 'fulfilled' or 'rejected' and either a value (the return value of the function) or a reason (the error message) if rejected.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is a good point. In this case, you would want to make sure that the async functions you're calling (e.g. GetAllStates()) are catching and handling their own errors. Another option is to use Promise.allSettled() which will return objects that have a status of 'fulfilled' or 'rejected' and either a value (the return value of the function) or a reason (the error message) if rejected.