more consistent error structure