Fix feedback for sharing errors
This commit is contained in:
parent
e0db22cc07
commit
41179a1456
|
@ -22,12 +22,12 @@ foreach ($sources as $source) {
|
||||||
OCP\JSON::success();
|
OCP\JSON::success();
|
||||||
}
|
}
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
OCP\Util::writeLog('files_sharing', 'Unexpected Error : '.$exception->getMessage(),OCP\Util::ERROR);
|
OCP\Util::writeLog('files_sharing', 'Unexpected Error : '.$exception->getMessage(), OCP\Util::ERROR);
|
||||||
OCP\JSON::error();
|
OCP\JSON::error(array('data' => array('message' => $exception->getMessage())));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
OCP\Util::writeLog('files_sharing', 'File does not exist or is not readable :'.$source,OCP\Util::ERROR);
|
OCP\Util::writeLog('files_sharing', 'File does not exist or is not readable :'.$source, OCP\Util::ERROR);
|
||||||
OCP\JSON::error();
|
OCP\JSON::error(array('data' => array('message' => 'File does not exist or is not readable')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ OC.Share={
|
||||||
callback(result.data);
|
callback(result.data);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
OC.dialogs.alert('Error', 'Error while sharing');
|
OC.dialogs.alert(result.data.message, 'Error while sharing');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue