Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
0ddb9c01
Unverified
Commit
0ddb9c01
authored
5 years ago
by
Julius Härtl
Browse files
Options
Downloads
Patches
Plain Diff
Expose exception message in the response
Signed-off-by:
Julius Härtl
<
jus@bitgrid.net
>
parent
4ff11e39
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/files/lib/Controller/DirectEditingController.php
+3
-3
3 additions, 3 deletions
apps/files/lib/Controller/DirectEditingController.php
with
3 additions
and
3 deletions
apps/files/lib/Controller/DirectEditingController.php
+
3
−
3
View file @
0ddb9c01
...
@@ -89,7 +89,7 @@ class DirectEditingController extends OCSController {
...
@@ -89,7 +89,7 @@ class DirectEditingController extends OCSController {
]);
]);
}
catch
(
Exception
$e
)
{
}
catch
(
Exception
$e
)
{
$this
->
logger
->
logException
(
$e
,
[
'message'
=>
'Exception when creating a new file through direct editing'
]);
$this
->
logger
->
logException
(
$e
,
[
'message'
=>
'Exception when creating a new file through direct editing'
]);
return
new
DataResponse
(
'Failed to create file
'
,
Http
::
STATUS_FORBIDDEN
);
return
new
DataResponse
(
'Failed to create file
: '
.
$e
->
getMessage
()
,
Http
::
STATUS_FORBIDDEN
);
}
}
}
}
...
@@ -106,7 +106,7 @@ class DirectEditingController extends OCSController {
...
@@ -106,7 +106,7 @@ class DirectEditingController extends OCSController {
]);
]);
}
catch
(
Exception
$e
)
{
}
catch
(
Exception
$e
)
{
$this
->
logger
->
logException
(
$e
,
[
'message'
=>
'Exception when opening a file through direct editing'
]);
$this
->
logger
->
logException
(
$e
,
[
'message'
=>
'Exception when opening a file through direct editing'
]);
return
new
DataResponse
(
'Failed to open file
'
,
Http
::
STATUS_FORBIDDEN
);
return
new
DataResponse
(
'Failed to open file
: '
.
$e
->
getMessage
()
,
Http
::
STATUS_FORBIDDEN
);
}
}
}
}
...
@@ -122,7 +122,7 @@ class DirectEditingController extends OCSController {
...
@@ -122,7 +122,7 @@ class DirectEditingController extends OCSController {
return
new
DataResponse
(
$this
->
directEditingManager
->
getTemplates
(
$editorId
,
$creatorId
));
return
new
DataResponse
(
$this
->
directEditingManager
->
getTemplates
(
$editorId
,
$creatorId
));
}
catch
(
Exception
$e
)
{
}
catch
(
Exception
$e
)
{
$this
->
logger
->
logException
(
$e
);
$this
->
logger
->
logException
(
$e
);
return
new
DataResponse
(
'Failed to o
pen file'
,
Http
::
STATUS_INTERNAL_SERVER_ERROR
);
return
new
DataResponse
(
'Failed to o
btain template list: '
.
$e
->
getMessage
()
,
Http
::
STATUS_INTERNAL_SERVER_ERROR
);
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment