@seamapi/nextlove-sdk-generator 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -53,7 +53,7 @@ class SeamClient
|
|
|
53
53
|
|
|
54
54
|
// TODO handle request errors
|
|
55
55
|
$response = $this->client->request($method, $path, $options);
|
|
56
|
-
$
|
|
56
|
+
$status_code = $response->getStatusCode();
|
|
57
57
|
|
|
58
58
|
$res_json = null;
|
|
59
59
|
try {
|
|
@@ -74,9 +74,11 @@ class SeamClient
|
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
if ($
|
|
77
|
+
if ($status_code >= 400) {
|
|
78
|
+
$error_message = $response->getReasonPhrase();
|
|
79
|
+
|
|
78
80
|
throw new Exception(
|
|
79
|
-
"HTTP Error: [" . $
|
|
81
|
+
"HTTP Error: " . $error_message . " [" . $status_code . "] " . $method . " " . $path
|
|
80
82
|
);
|
|
81
83
|
}
|
|
82
84
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-seam-client.js","sourceRoot":"","sources":["../../../src/lib/generate-php-sdk/utils/generate-seam-client.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,gBAAgB,EAChB,qBAAqB,GACd,EAAE,EAAE;IACX,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,MAAM,CACrD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAC1B,CAAA;IAED,OAAO;;;;EAIP,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;IAOrE,uBAAuB;SACtB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,WAAW,WAAW,CAAC,CAAC,SAAS,GAAG,CAAC;SAC5D,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;MAoBX,uBAAuB;SACtB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,SAAS,UAAU,CAAC,CAAC,WAAW,gBAAgB,CAAC;SACxE,IAAI,CAAC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"generate-seam-client.js","sourceRoot":"","sources":["../../../src/lib/generate-php-sdk/utils/generate-seam-client.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,gBAAgB,EAChB,qBAAqB,GACd,EAAE,EAAE;IACX,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,MAAM,CACrD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAC1B,CAAA;IAED,OAAO;;;;EAIP,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;IAOrE,uBAAuB;SACtB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,WAAW,WAAW,CAAC,CAAC,SAAS,GAAG,CAAC;SAC5D,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;MAoBX,uBAAuB;SACtB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,SAAS,UAAU,CAAC,CAAC,WAAW,gBAAgB,CAAC;SACxE,IAAI,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgEnB,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;CACxD,CAAA;AACD,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -66,7 +66,7 @@ class SeamClient
|
|
|
66
66
|
|
|
67
67
|
// TODO handle request errors
|
|
68
68
|
$response = $this->client->request($method, $path, $options);
|
|
69
|
-
$
|
|
69
|
+
$status_code = $response->getStatusCode();
|
|
70
70
|
|
|
71
71
|
$res_json = null;
|
|
72
72
|
try {
|
|
@@ -87,9 +87,11 @@ class SeamClient
|
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
if ($
|
|
90
|
+
if ($status_code >= 400) {
|
|
91
|
+
$error_message = $response->getReasonPhrase();
|
|
92
|
+
|
|
91
93
|
throw new Exception(
|
|
92
|
-
"HTTP Error: [" . $
|
|
94
|
+
"HTTP Error: " . $error_message . " [" . $status_code . "] " . $method . " " . $path
|
|
93
95
|
);
|
|
94
96
|
}
|
|
95
97
|
|