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 c65cb61 commit 35e4e47Copy full SHA for 35e4e47
packages/gotrue/lib/src/gotrue_client.dart
@@ -756,8 +756,9 @@ class GoTrueClient {
756
}
757
758
final errorDescription = url.queryParameters['error_description'];
759
+ final errorCode = url.queryParameters['error_code'];
760
if (errorDescription != null) {
- throw AuthException(errorDescription);
761
+ throw AuthException(errorDescription, statusCode: errorCode);
762
763
764
if (_flowType == AuthFlowType.pkce) {
packages/gotrue/test/client_test.dart
@@ -137,6 +137,7 @@ void main() {
137
fail('getSessionFromUrl did not throw exception');
138
} on AuthException catch (error) {
139
expect(error.message, errorMessage);
140
+ expect(error.statusCode, '401');
141
} catch (error) {
142
fail(
143
'getSessionFromUrl threw ${error.runtimeType} instead of AuthException');
0 commit comments