I am building a API with banking operations.
I have 2 dict for my data:
accounts_data = {}
accounts_transaction_data = {}
I have this scenario
accounts_data = {"Jack": 0}
accounts_transaction_data = {}
When I search for Jack's transaction history:
First I check to make sure there is an account for Jack
True
After that I am looking in
accounts_transaction_datafor data ti return. But there is no data, because of Jack did not make any money transactions yet.
Here is my question:
Should I return a HTTP 404 status code? With a message like:
There is no transaction history for the account name you entered to see the transaction history
OR
Should I return a HTTP 200 status code? With a message like:
There is no transaction history for the account name you entered to see the transaction history
200 or 404 ?
Thanks for your help!