More user-friendly handling of 4xx and 5xx errors