Skip to content

Fix flag error display when duplicate flagging#466

Merged
TylerDiorio merged 1 commit into
mainfrom
996/flag-error
Oct 21, 2025
Merged

Fix flag error display when duplicate flagging#466
TylerDiorio merged 1 commit into
mainfrom
996/flag-error

Conversation

@TylerDiorio
Copy link
Copy Markdown
Member

Issue

useFlagging.ts was trying to JSON.parse() the error message string, which doesn't work because ApiError.message is just a plain string, not a JSON string. Additionally, it was looking for nested data objects that don't exist

Screenshot 2025-10-17 at 6 40 32 PM

Solution

Now it correctly accesses the errors property directly from the ApiError object, where the backend response data is actually stored.

Screenshot 2025-10-17 at 6 37 21 PM

@TylerDiorio TylerDiorio requested a review from a team as a code owner October 18, 2025 01:40
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Oct 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
web Ready Ready Preview Comment Oct 18, 2025 1:41am

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

@sonarqubecloud
Copy link
Copy Markdown

@TylerDiorio TylerDiorio merged commit fd1f744 into main Oct 21, 2025
4 checks passed
@TylerDiorio TylerDiorio deleted the 996/flag-error branch October 21, 2025 01:09
saimuren added a commit to saimuren/web that referenced this pull request Feb 17, 2026
Adds a menu item to upload figures to papers, implementing ResearchHub#466.
Uses existing ImageUploadModal component.
saimuren added a commit to saimuren/web that referenced this pull request Feb 17, 2026
Adds a menu item to upload figures to papers, implementing ResearchHub#466.
Uses existing ImageUploadModal component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants