Using {Action Type}_FAILED #157

Closed
mickhansen opened this Issue Mar 2, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@mickhansen

http://martyjs.org/guides/action-creators/index.html refers to {Action Type}_FAILED and similar types.
Reading the description it seems these default actions could be used to (more) easily implement progress and error tracking - However the payload of these actions seem to only contain an internal actionId generated by Marty.js which can't really be used to reference anything.

Am i going about this the wrong way? I would assume the payloads to contain the same thing as payload or similiar - Would it better to manually dispatch error events from the state source to the source action creators?

@msimulcik

This comment has been minimized.

Show comment
Hide comment
@msimulcik

msimulcik Mar 5, 2015

I'd also like to know more about purpose of these automatically dispatched actions that do not carry any application relevant data.

I'd also like to know more about purpose of these automatically dispatched actions that do not carry any application relevant data.

@jhollingworth

This comment has been minimized.

Show comment
Hide comment
@jhollingworth

jhollingworth Mar 6, 2015

Contributor

hey, sorry for the delay in getting back to you on this. According to the code we do pass the error as one of the arguments however there might be a bug there. I will have a look at this over the weekend. I'm not entirely happy with how error handling works right now and I think its probably something I'm going to fix in the up coming release. For now I'd say it probably makes more sense to handle errors yourself as I will probably move back to that approach

Contributor

jhollingworth commented Mar 6, 2015

hey, sorry for the delay in getting back to you on this. According to the code we do pass the error as one of the arguments however there might be a bug there. I will have a look at this over the weekend. I'm not entirely happy with how error handling works right now and I think its probably something I'm going to fix in the up coming release. For now I'd say it probably makes more sense to handle errors yourself as I will probably move back to that approach

@mickhansen

This comment has been minimized.

Show comment
Hide comment
@mickhansen

mickhansen Mar 6, 2015

@jhollingworth It does contain that, but no reference to the original action, hence no way to map errors/successes back to initial requests.

But i will go forward with handling it manually with sourceActionCreators and the state sources.

Thank you for a great project, made it much easier to get started with Flux

@jhollingworth It does contain that, but no reference to the original action, hence no way to map errors/successes back to initial requests.

But i will go forward with handling it manually with sourceActionCreators and the state sources.

Thank you for a great project, made it much easier to get started with Flux

@jhollingworth

This comment has been minimized.

Show comment
Hide comment
@jhollingworth

jhollingworth Mar 6, 2015

Contributor

@mickhansen Hopefully #163 will resolve your issues

Contributor

jhollingworth commented Mar 6, 2015

@mickhansen Hopefully #163 will resolve your issues

@mickhansen

This comment has been minimized.

Show comment
Hide comment
@mickhansen

mickhansen Mar 6, 2015

@jhollingworth Yeah looks like it :)

@jhollingworth Yeah looks like it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment