TradeSoft is a well-known company in the crypto market that provides powerful statistics, dashboards and metrics to their customers. As a backend software developer in TradeSoft, you were requested to develop a REST API which integrates with most famous crypto exchanges and exposes aggregated data to be visualized in the application.
Currently the api is returning the raw error code from each of the packages and some dynamic error code to be used. Need to have a standardised error code system.
for each of the relied 3pp errors, split into 400 and 500 error codes, and use appropriate biz_code and err messages for the api.
use static errors to replace or wrap the dynamic errors.