Skip to content
Snippets Groups Projects
Commit 923a22a1 authored by Thomas Müller's avatar Thomas Müller
Browse files

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
No related tags found
Loading
......@@ -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;
}
/**
......
......@@ -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],
];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment