Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
923a22a1
Commit
923a22a1
authored
9 years ago
by
Thomas Müller
Browse files
Options
Downloads
Plain Diff
Merge pull request #18084 from owncloud/ocs-anything-other-then-100-means-failure
[OCS] Error handling - fix in status code mapper
parents
7f44b0fd
db141634
Branches
Branches containing commit
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/private/api.php
+1
-5
1 addition, 5 deletions
lib/private/api.php
tests/ocs/response.php
+1
-1
1 addition, 1 deletion
tests/ocs/response.php
with
2 additions
and
6 deletions
lib/private/api.php
+
1
−
5
View file @
923a22a1
...
...
@@ -444,11 +444,7 @@ class OC_API {
return
$sc
;
}
// any error codes > 100 are treated as client errors
if
(
$sc
>
100
&&
$sc
<
200
)
{
return
Http
::
STATUS_BAD_REQUEST
;
}
return
Http
::
STATUS_OK
;
return
Http
::
STATUS_BAD_REQUEST
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
tests/ocs/response.php
+
1
−
1
View file @
923a22a1
...
...
@@ -35,7 +35,7 @@ class OcsResponseTest extends \Test\TestCase {
return
[
[
Http
::
STATUS_OK
,
100
],
[
Http
::
STATUS_BAD_REQUEST
,
104
],
[
Http
::
STATUS_
OK
,
1000
],
[
Http
::
STATUS_
BAD_REQUEST
,
1000
],
[
201
,
201
],
];
}
...
...
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