File tree 2 files changed +27
-2
lines changed
2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 13
13
* limitations under the License.
14
14
**/
15
15
16
+ use CalDAVClient \Facade \Exceptions \ConflictException ;
16
17
use CalDAVClient \Facade \Exceptions \ForbiddenException ;
17
18
use CalDAVClient \Facade \Requests \CalDAVRequestFactory ;
18
19
use CalDAVClient \Facade \Requests \CalendarQueryFilter ;
@@ -138,6 +139,7 @@ public function setAuthenticationType($authtype) {
138
139
/**
139
140
* @param Request $http_request
140
141
* @return mixed|\Psr\Http\Message\ResponseInterface
142
+ * @throws \GuzzleHttp\Exception\GuzzleException
141
143
*/
142
144
private function makeRequest (Request $ http_request ){
143
145
try {
@@ -151,11 +153,13 @@ private function makeRequest(Request $http_request){
151
153
case 401 :
152
154
throw new UserUnAuthorizedException ();
153
155
break ;
156
+ case 403 :
157
+ throw new ForbiddenException ();
154
158
case 404 :
155
159
throw new NotFoundResourceException ();
156
160
break ;
157
- case 403 :
158
- throw new ForbiddenException ();
161
+ case 409 :
162
+ throw new ConflictException ();
159
163
default :
160
164
throw new ServerErrorException ($ ex ->getMessage (), $ ex ->getCode ());
161
165
break ;
Original file line number Diff line number Diff line change
1
+ <?php namespace CalDAVClient \Facade \Exceptions ;
2
+ /**
3
+ * Copyright 2018 OpenStack Foundation
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ * Unless required by applicable law or agreed to in writing, software
9
+ * distributed under the License is distributed on an "AS IS" BASIS,
10
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ * See the License for the specific language governing permissions and
12
+ * limitations under the License.
13
+ **/
14
+ /**
15
+ * Class ConflictException
16
+ * @package CalDAVClient\Facade\Exceptions
17
+ */
18
+ final class ConflictException extends \RuntimeException
19
+ {
20
+
21
+ }
You can’t perform that action at this time.
0 commit comments