I have a mockup, shown below, presenting an error state if a data table doesn't load for some reason such as an API failure.
A developer asked whether the filter should even be shown if the content couldn't load. This may make sense if the failure occurs when first loading the page, as there's nothing to filter.
But, what if the error appears after the user adjusts filters. If the error state made everything disappear, including the filters, the user would be confused. But if the filters remained, then perhaps the user could change filters to reload some results - escaping the error in a sense.
A separate issue occurs to me: the filter options may also be retrieved via API. I could show a separate error state for that, but then things seem to be getting complicated.
Overall, I'd like to hear some best practices for how to present error/empty states gracefully in this scenario, or how others have successfully handled similar situations.