Add error handling when API call fails to CategoriesPresenter.onAttachViewWithMedia

This commit is contained in:
Ted Gilbert 2025-10-25 10:35:49 +11:00
parent b988460a41
commit c0a9e5134a

View file

@ -200,7 +200,12 @@ class CategoriesPresenter
},
{ t: Throwable? ->
view.showProgress(false)
view.showError(R.string.no_categories_found)
view.showError(R.string.error_loading_categories)
val mwException = t as? MwIOException
view.showErrorDialog(
if (mwException == null) ""
else "\n${mwException.error.title} / ${mwException.error.details}"
)
Timber.e(t)
},
),