-
Notifications
You must be signed in to change notification settings - Fork 47
Sherman Christina, TREK #44
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
base: master
Are you sure you want to change the base?
Conversation
… alt way to show trip info
TREKWhat We're Looking For
|
| const individualTrip = showTrip(trip.id); | ||
| vacation.click(individualTrip); | ||
| }) | ||
| .catch(error => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have the catch after the forEach. Instead move the }) on line 45, up to before the .catch
You can see the error in your browser console
| }) | ||
| .catch(error => { | ||
| console.log(error.response); | ||
| if (error.response.data && error.response.data.errors) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the post doesn't work (network error), then there may be no error.response (it may be undefined).
This should be:
if (error.response && error.response.data && error.response.data.errors) {
| }) | ||
| .catch(error => { | ||
| console.log(error.response); | ||
| if (error.response.data && error.response.data.errors) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar issue to the above
TREK
Congratulations! You're submitting your assignment!
Comprehension Questions
Tripin the list by it's ID field. Would it be advantageous to keep the list in order by the id field? Explain why or why not.