MarcelLZ / barbecue-company

Have fun!
2 stars 0 forks source link

[Minor] Error wrapped in rejected promise #72

Open lucasconstantino opened 6 years ago

lucasconstantino commented 6 years ago

Could you explain me why is this line relevant? What does it accomplishes?

https://github.com/MarcelLZ/barbecue-company/blob/303d70840c7f0384d47eb4a2b9512b4583461a65/frontend/src/utils/api.js#L18

MarcelLZ commented 6 years ago

So, you can do something wrong with the request, maybe when you're configuring it. But, you are right, in this case, the configuration is so simple, and I agree that it is not necessary.

lhguerra commented 6 years ago

What does it accomplish*

:stuck_out_tongue_closed_eyes:

lucasconstantino commented 6 years ago

@MarcelLZ what I really though is odd in this code is that it seems that either returning the (rejected) promise or the error itself would have the same outcome. But I've never really used axios, so honestly I might just be wrong.

lhguerra commented 6 years ago

@lucasconstantino one mistake is ok, now you are just teasing me :trollface: