Skip to content

Fix:Error message for invalid task ID #2345

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

rahul-flex
Copy link
Contributor

Previously, when web.load received a 404 response for an invalid or non-existent task ID, the client would return None and produce unhelpful error messages. This commit changes that behavior: it now raises a TaskNotFoundError with a clear, user-friendly explanation.
Screenshot 2025-03-31 at 11 22 56 PM

@rahul-flex rahul-flex requested a review from yaugenst-flex April 1, 2025 03:23
@rahul-flex rahul-flex force-pushed the rahul-flex/webapi-errors branch from b55cbb0 to 0428080 Compare April 1, 2025 17:39
Copy link
Collaborator

@yaugenst-flex yaugenst-flex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rahul-flex! This is going in the right direction but we should try to handle 404 errors more generally.

@rahul-flex rahul-flex force-pushed the rahul-flex/webapi-errors branch from 61f4c3b to d46649b Compare April 1, 2025 19:20
@rahul-flex
Copy link
Contributor Author

Updated error message:
Screenshot 2025-04-01 at 8 47 36 PM

@rahul-flex rahul-flex requested a review from yaugenst-flex April 2, 2025 00:47
@yaugenst-flex
Copy link
Collaborator

Closes #2154

Copy link
Collaborator

@yaugenst-flex yaugenst-flex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rahul-flex looks good to go from my side, minus the little changelog clarification.

@yaugenst-flex yaugenst-flex requested a review from QingengWei April 4, 2025 07:05
@yaugenst-flex
Copy link
Collaborator

@QingengWei could you have a look? This addresses the discussion in #2154. The http_interceptor now raises an error on 404 instead of returning None, which means that the API should now be able to return 404 status which we then need to handle properly here on the client.

The old if resp is None checks are still in place to keep compatibility but I think we should move to returning "normal" status codes on the API side?

@yaugenst-flex
Copy link
Collaborator

@rahul-flex I think this is good to go after the small change in the changelog. could you rebase?

@rahul-flex rahul-flex force-pushed the rahul-flex/webapi-errors branch from e604275 to 29fa604 Compare May 1, 2025 04:57
@yaugenst-flex yaugenst-flex merged commit 9c8ca5f into develop May 1, 2025
9 checks passed
@yaugenst-flex yaugenst-flex deleted the rahul-flex/webapi-errors branch May 1, 2025 05:14
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