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.
2 parents 27ccacf + fe7e971 commit b7dc4b7Copy full SHA for b7dc4b7
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("The shop is invalid 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