ktageja / DataSense-PRJ666-team-5

MIT License
0 stars 0 forks source link

Use case 18: Implement Error Handling for Data Retrieval #21

Open ktageja opened 3 days ago

ktageja commented 3 days ago

Implement Error Handling for Data Retrieval

User Story

As a user, I want to receive proper error messages if the system is unable to retrieve my sensor data so that I know there is an issue and can take appropriate action.

Description

This use case involves implementing robust error handling for scenarios where the system fails to retrieve real-time or historical sensor data from the backend. Proper error messages should be displayed on the dashboard if the data cannot be loaded due to server issues, missing data, or network errors. Error logs should be maintained for debugging and troubleshooting.

Acceptance Criteria

Testing

Normal Flow of Events

The system attempts to retrieve real-time sensor data from the backend. The backend sends the data successfully, and the dashboard displays it. The system logs any potential backend errors for future debugging.

Alternate/Exceptional Flows:

S-1:Failure to retrieve real-time data due to server issues

The system fails to retrieve real-time data due to server downtime or unavailability. The dashboard displays an error message: "Unable to retrieve live data. Please try again later.

S-2: No data available for selected date range

The user selects a date range where no data exists in the database. The system displays an error message: "No data available for the selected date range."

S-3: Network connectivity issue

The user's internet connection is interrupted, causing data retrieval to fail. The system shows an error message, and the dashboard remains functional with cached data (if available).