There’s an error somewhere

This commit is contained in:
Jonny Barnes 2017-02-24 14:24:57 +00:00
parent 40723450ba
commit e7407fb09c

View file

@ -95,6 +95,7 @@ class MicropubClientController extends Controller
$token = $request->session()->get('token');
$micropubEndpoint = $this->indieAuthService->discoverMicropubEndpoint($domain, $this->indieClient);
if (! $micropubEndpoint) {
die('No known endpoint');
return redirect(route('micropub-client'))->withErrors('Unable to determine micropub API endpoint', 'endpoint');
}
@ -104,6 +105,7 @@ class MicropubClientController extends Controller
'query' => ['q' => 'syndicate-to'],
]);
} catch (\GuzzleHttp\Exception\BadResponseException $e) {
dd($e);
return redirect(route('micropub-client'))->withErrors('Bad response when refreshing syndication targets', 'endpoint');
}
$body = (string) $response->getBody();