Skip to content

Commit 1048882

Browse files
committed
Status codes added to beginning of exception messages
1 parent ea88611 commit 1048882

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

JotForm.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,17 @@ private function _executeHttpRequest($path, $params=array(), $method){
114114
switch ($http_status) {
115115
case 400:
116116
case 404:
117-
throw new JotFormException($result_obj["message"]);
117+
throw new JotFormException($http_status . " " . $result_obj["message"] );
118118
break;
119119
case 401:
120-
throw new JotFormException("Unauthorized API call");
120+
throw new JotFormException($http_status . " Unauthorized API call");
121121
break;
122122
case 503:
123-
throw new JotFormException("Service is unavailable, rate limits etc exceeded!");
123+
throw new JotFormException($http_status . " Service is unavailable, rate limits etc exceeded!");
124124
break;
125125

126126
default:
127-
throw new JotFormException($result_obj["info"]);
127+
throw new JotFormException($http_status . " " . $result_obj["info"]);
128128
break;
129129
}
130130
}

0 commit comments

Comments
 (0)