- } else if (operation instanceof CreateShareOperation) {
- if (result.getCode() == ResultCode.SHARE_NOT_FOUND) { // Error --> SHARE_NOT_FOUND
+ } else if (operation instanceof CreateShareViaLinkOperation ||
+ operation instanceof CreateShareWithShareeOperation) {
+
+ if (result.getData() != null && result.getData().size() > 0) {
+ message = (String) result.getData().get(0); // share API sends its own error messages
+
+ } else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {