Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asyncValidate bug: Uncaught (in promise) #1737

Closed
bertho-zero opened this issue Sep 9, 2016 · 14 comments
Closed

asyncValidate bug: Uncaught (in promise) #1737

bertho-zero opened this issue Sep 9, 2016 · 14 comments

Comments

@bertho-zero
Copy link

bertho-zero commented Sep 9, 2016

Hello,

I use the method asyncValidate and no matter how I return my errors it returns me an error.

I have a simple function like the following and any of the following methods works:

export function asyncValidate( values, dispatch ) {
  return Promise.reject( {slug: 'merde'} );
  // return Promise.resolve( {slug: 'merde'} );
  // return new Promise( {slug: 'merde'} );
  // throw {slug: 'merde'};
  // return { slug: 'merde' };
}

The error displayed in console:

Uncaught (in promise) Object {slug: "merde"}
@Guria
Copy link

Guria commented Sep 10, 2016

Try:
return new Promise((resolve, reject) => reject(errors))

@Guria
Copy link

Guria commented Sep 10, 2016

It is only way that worked for me

@RazerM
Copy link

RazerM commented Sep 13, 2016

@Guria That doesn't work for me. It's essentially doing the same thing, no?

@skolmer
Copy link

skolmer commented Sep 15, 2016

I think this is duplicate of #1704 and #1297
It should be fixed in the next version because #1722 got merged

@erikras
Copy link
Member

erikras commented Sep 15, 2016

#1722 was just published in v6.0.3.

Reopen if this is still a problem.

@erikras erikras closed this as completed Sep 15, 2016
@caiobalthazar
Copy link

caiobalthazar commented Sep 18, 2016

@erikras, are we supposed to be seeing this Uncaught error on 6.0.5?
I am still getting those, even the website's example is throwing those up.
It seems something is still wrong. Screenshot attached.
screenshot 2016-09-18 00 23 41

@skolmer
Copy link

skolmer commented Sep 18, 2016

@caiobalthazar this is still an issue, you can subscribe to #1297 for further updates

@jainniket
Copy link

jainniket commented Oct 10, 2016

I'm also facing this issue Uncaught (in promise) in asyncValidation.

Waiting for its fix.

@skolmer
Copy link

skolmer commented Oct 10, 2016

@jainniket this was fixed in v6.1.0 #1297

@pmyagkov
Copy link

Reproducing in v6.1.1

@jelteliekens
Copy link

Still not fixed here in v6.2.0

@smiller393
Copy link

smiller393 commented Feb 6, 2017

Reproducing in 6.5, even the website's example. Does anyone have a fix for this?
It also seems to be refusing to re-submit once this uncaught error is thrown.

@leopsos
Copy link

leopsos commented May 31, 2017

Still reproducing in 6.7, with the website example at:
http://redux-form.com/6.7.0/examples/asyncValidation/

@lock
Copy link

lock bot commented Jun 1, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests