$this->logger->error('Getting the account information failed: too many requests - HTTP status: '.$status.' Response body: '.$body,['app'=>'spreed']);
returnnewDataResponse([
'message'=>$this->l10n->t('Too many requests are send from your servers address. Please try again later.')
],Http::STATUS_TOO_MANY_REQUESTS);
caseHttp::STATUS_NOT_FOUND:
$body=$response->getBody()->getContents();
$this->logger->error('Getting the account information failed: account not found - HTTP status: '.$status.' Response body: '.$body,['app'=>'spreed']);
returnnewDataResponse([
'message'=>$this->l10n->t('There is no such account registered.')
],Http::STATUS_CONFLICT);
caseHttp::STATUS_INTERNAL_SERVER_ERROR:
$body=$response->getBody()->getContents();
$this->logger->error('Getting the account information failed: internal server error - HTTP status: '.$status.' Response body: '.$body,['app'=>'spreed']);
returnnewDataResponse([
'message'=>$this->l10n->t('Something unexpected happened. Please try again later.')
],Http::STATUS_INTERNAL_SERVER_ERROR);
default:
$body=$response->getBody()->getContents();
$this->logger->error('Getting the account information failed: something else happened - HTTP status: '.$status.' Response body: '.$body,['app'=>'spreed']);
returnnewDataResponse([
'message'=>$this->l10n->t('Failed to fetch account information because the trial server behaved wrongly. Please check back later.')
],Http::STATUS_INTERNAL_SERVER_ERROR);
}
}catch(\Exception$e){
$this->logger->logException($e,[
'app'=>'spreed',
'message'=>'Failed to request hosted signaling server trial',
]);
returnnewDataResponse([
'message'=>$this->l10n->t('Failed to fetch account information because the trial server is unreachable. Please check back later.')
],Http::STATUS_INTERNAL_SERVER_ERROR);
}
$status=$response->getStatusCode();
if($status!==Http::STATUS_OK){
$body=$response->getBody();
$this->logger->error('Getting the account information failed: something else happened - HTTP status: '.$status.' Response body: '.$body,['app'=>'spreed']);
{{t('spreed','Our partner Struktur AG provides a service where a hosted signaling server can be requested. For this you only need to fill out the form below and your Nextcloud will request it. Once the server is set up for you the credentials will be filled automatically.')}}
</p>
<div>
<divv-if="!trailAccount.status">
<h4>{{t('spreed','URL of this Nextcloud instance')}}</h4>