Closed Stonebanks-js closed 1 month ago
We need to enhance the functionality of the currency conversion script by:
Implementing proper error handling for invalid inputs, network failures, or API errors. Adding input validation to ensure correct currency codes and numerical values are provided. Extending the cache mechanism to allow for offline mode by storing conversion rates locally.
Error Handling:
Catch exceptions related to invalid currency codes or issues with the API.
Handle scenarios where the API returns no data or fails to connect.
Input Validation:
Ensure currency codes are three-letter strings (ISO format). Validate that the amount entered is a positive integer or float.
Offline Mode with Cache:
Store the exchange rates in a local file after the first API call. Use the cached file for future conversions when offline or if the API fails.
@DhanushNehru Assign this task to me and add @hacktoberfest-accepted label
Description:
We need to enhance the functionality of the currency conversion script by:
Feature Details:
Error Handling:
Input Validation:
Offline Mode with Cache:
Steps that I will perform :