We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 03a1436a authored by Zach Copley's avatar Zach Copley

Trap ClientExceptions from media upload process and hand them off to API error handler

parent 9ef05030
......@@ -192,7 +192,13 @@ class ApiStatusesUpdateAction extends ApiAuthAction
}
$upload = null;
$upload = MediaFile::fromUpload('media', $this->user);
try {
$upload = MediaFile::fromUpload('media', $this->user);
} catch (ClientException $ce) {
$this->clientError($ce->getMessage());
return;
}
if (isset($upload)) {
$status_shortened .= ' ' . $upload->shortUrl();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment