Skip to content

Conversation

@artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Oct 8, 2024

Closes #1423

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
128 127 0 1 0

Bundle Size: ✅

Current: 79.13 MB | Main: 79.13 MB
Diff: +0.08 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

const location = useLocation();

const [authenticate, {error, isLoading}] = authenticationApi.useAuthenticateMutation(undefined);
const [authenticate, {isLoading}] = authenticationApi.useAuthenticateMutation(undefined);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why didn't it work as expected?
I mean isn't auth mutation supposed to return error on error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mutation result is always {data, error}, it cannot be processed by catch without .unwrap(). In previous version code in .then always ran, that caused the bug with error being ignored. I could use only .then as well - .then(({data, error}) -> {}), but form with explicit .catch looks better for me

@artemmufazalov artemmufazalov added this pull request to the merge queue Oct 8, 2024
Merged via the queue into main with commit 10f817e Oct 8, 2024
6 checks passed
@artemmufazalov artemmufazalov deleted the 1423-login-bug branch October 8, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

result of login operation ignored

3 participants