dosubot[bot] commented on issue #8539:
URL: 
https://github.com/apache/incubator-devlake/issues/8539#issuecomment-3188609506

   <!-- Answer -->
   You’re right about the root cause: the Projects page fetches project data in 
[`config-ui/src/routes/project/detail/index.tsx`](https://github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/config-ui/src/routes/project/detail/index.tsx)
 using the `useRefreshData` hook and `API.project.get(pname)`. Right now, it 
only checks if data is loaded and shows a spinner if not, but doesn’t handle 
API errors like 404s—so the loader never stops if the project isn’t found.
   
   To fix this, you’ll want to update the component to check for an error state 
from `useRefreshData`. If the error is a 404, you can show a user-friendly 
message or redirect to the projects list. The API call itself is defined in 
[`config-ui/src/api/project/index.ts`](https://github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/config-ui/src/api/project/index.ts).
   
   If you need help with the error handling logic or want to see examples from 
elsewhere in the codebase, let me know!
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/9744c222-bc61-4d92-ac99-8e4f6d092e01?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/9744c222-bc61-4d92-ac99-8e4f6d092e01?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/9744c222-bc61-4d92-ac99-8e4f6d092e01?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/9744c222-bc61-4d92-ac99-8e4f6d092e01?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/9744c222-bc61-4d92-ac99-8e4f6d092e01?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/9744c222-bc61-4d92-ac99-8e4f6d092e01?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/9744c222-bc61-4d92-ac99-8e4f6d092e01?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/b4e8e847-d479-4541-83a8-d88d83fea5c9/ask?utm_source=githu
 b)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-devlake/issues/8539)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to