Skip to content

[FEATURE] Currency Script | Implement API handler for external exchange service #431

@sue-lim

Description

@sue-lim

The API request and error handling are not abstracted, making it hard to reuse or test.

###Describe the solution you'd like
Create api_handler.py:

Fetch exchange rates
Handle errors (e.g., timeout, invalid key)
Return clean JSON data to the app

Describe alternatives
Inline API calls, which reduce flexibility and testability.

Additional context
This decouples API communication from app logic and allows mocking in tests.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions