Repository navigation
fix: load the profile once per switch and show an error for unknown users #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devin/task-25-angular-boot3-contract-v2
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,11 @@ export class ProfileComponent implements OnInit { | |
| this.errors.set(null); | ||
| return this.profileService.get(params.get('username')!).pipe( | ||
| catchError(error => { | ||
| this.errors.set(error.errors || { error: ['Failed to load profile'] }); | ||
| this.errors.set( | ||
| error.status === 404 | ||
| ? { errors: { profile: ['not found'] } } | ||
| : { errors: error.errors ?? { profile: ['could not be loaded'] } }, | ||
|
Comment on lines
+51
to
+52
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧠 TD French Language (Bill 96): English-only profile error messages On lookup failures, View in Devin Review · Custom reviewer Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| ); | ||
| return EMPTY; | ||
| }), | ||
| ); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Profile tabs use unverified URL usernames
When a profile lookup resolves a username differently from the URL,
articlesConfiguses the URL value instead of the returned username. Check whether profile lookup and article filtering apply the same username matching rules; the favorites tab makes the same change.Was this helpful? React with 👍 or 👎 to provide feedback.