better handling of 500s statuses