Handle the orders failures

This solution is still a bit too messy and probably the error structure
needs to be changed to handle a generic identifier and a type