We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05eb123 commit 90c329dCopy full SHA for 90c329d
lib/AuthHelper.php
@@ -170,6 +170,10 @@ public static function getAccessToken()
170
171
$response = HttpRequestJson::post($config['AdminUrl'] . 'oauth/access_token', $data);
172
173
+ if (CurlRequest::$lastHttpCode >= 400) {
174
+ throw new SdkException("Invalid request. The shop domain is incorrect or the authorization code has already been used.");
175
+ }
176
+
177
return isset($response['access_token']) ? $response['access_token'] : null;
178
} else {
179
throw new SdkException("This request is not initiated from a valid shopify shop!");
0 commit comments