so doing this in the API like this is really replicating when is being done in the service. Maybe we just need to improve the error message passing from the service to the api?