You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
Currently, the TicketPage doesn't properly handle the case when the id provided does not exist in the system. If the ID doesn't correspond to an existing ticket, the page crashes unexpectedly.
Expected Behavior:
If the id does not correspond to any ticket, the user should see a clear error message like "Ticket not found" or be redirected to a custom 404 page.
The getTicketById function should handle invalid cases gracefully by returning a null or some indication when the ticket is not found, avoiding any crashes or undefined states.
Steps to Reproduce:
Attempt to access TicketPage with an invalid ticket ID (for eg. try hitting http://localhost:3000/TicketPage/invalid-ticket-id).
Observe that the app breaks.
We need to make sure the getTicketById function correctly handles failure scenarios, including cases where the API does not return a valid ticket, and shows appropriate feedback on the page.
The text was updated successfully, but these errors were encountered:
Description:
Currently, the
TicketPage
doesn't properly handle the case when theid
provided does not exist in the system. If the ID doesn't correspond to an existing ticket, the page crashes unexpectedly.Expected Behavior:
id
does not correspond to any ticket, the user should see a clear error message like "Ticket not found" or be redirected to a custom 404 page.getTicketById
function should handle invalid cases gracefully by returning anull
or some indication when the ticket is not found, avoiding any crashes or undefined states.Steps to Reproduce:
TicketPage
with an invalid ticket ID (for eg. try hittinghttp://localhost:3000/TicketPage/invalid-ticket-id
).We need to make sure the
getTicketById
function correctly handles failure scenarios, including cases where the API does not return a valid ticket, and shows appropriate feedback on the page.The text was updated successfully, but these errors were encountered: