The function shouldn't know all the different error types, move logic to operations or controller
The function shouldn't know all the different error types, move logic to operations or controller