Skip to content

Generic Exception Error displayed when creating a Timesheet #272

Description

@Omkarbahirat
  1. Issue Summary
    Users encounter an unhandled generic error modal ("Error: Something happened.") when attempting to create or submit a timesheet, blocking time-tracking functionality and obscuring the underlying cause.

  2. Environment & Context
    Module: Timesheets

Component: Frontend UI / API Integration

Severity: High (Blocks core functionality)

Priority: High

  1. Steps to Reproduce
    Navigate to the Timesheets view from the primary navigation menu.

Click the Add / Create Timesheet action button.

Complete the required timesheet fields and submit the form.

  1. Expected vs. Actual Behavior
    Expected Behavior:
    The timesheet is successfully saved and listed under the appropriate tab. If validation or server-side failure occurs, the UI displays a clear, actionable error message detailing the specific cause (e.g., "Session Expired", "Missing Required Field: Task", or "Network Connection Lost").

Actual Behavior:
A generic pop-up dialog appears displaying:

Error

Something happened.

[ OK ]

  1. Technical Notes & Recommendations
    Error Handling: The frontend error boundary/catch block is defaulting to a generic string rather than parsing the error response payload from the backend API.

Backend Status Code: Verify if the API is returning an unhandled 500 Internal Server Error or a unmapped status code (e.g., 400, 401, 403).

Fix Scope: Update the error handling component to extract and display response.data.message (or equivalent) to provide clear feedback to the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions