try/catch in api, while decoding json