Change erroneous response->code() calls to response->status()