When navigating to a non-existent document, the app shows a generic error toast and redirects to dashboard without explaining what happened:
doc=awaitapi.getDocument(id);}catch(e){app.showToast('Failed to load document','error');app.navigate('dashboard');return;}
Problem
User does not know if the document was deleted, they don't have permission, or if they typed the wrong ID.
Recommendation
Show a more descriptive error message based on the HTTP status code:
404: "Document not found"
403: "You don't have permission to view this document"
etc.
## Description
When navigating to a non-existent document, the app shows a generic error toast and redirects to dashboard without explaining what happened:
```javascript
doc = await api.getDocument(id);
} catch (e) {
app.showToast('Failed to load document', 'error');
app.navigate('dashboard');
return;
}
```
### Problem
User does not know if the document was deleted, they don't have permission, or if they typed the wrong ID.
### Recommendation
Show a more descriptive error message based on the HTTP status code:
- 404: "Document not found"
- 403: "You don't have permission to view this document"
- etc.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
When navigating to a non-existent document, the app shows a generic error toast and redirects to dashboard without explaining what happened:
Problem
User does not know if the document was deleted, they don't have permission, or if they typed the wrong ID.
Recommendation
Show a more descriptive error message based on the HTTP status code: