Improved api error output