getStatusCode() method for BadStatusException