Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[VIP][Travel] View trip details and authenticate to travelDot #43081
[VIP][Travel] View trip details and authenticate to travelDot #43081
Changes from 32 commits
03af563
5b0fd92
b2d1aa3
d2f6dad
2851353
c4f4512
a408b66
fb7fdec
68ba31d
09af194
69cf344
d0bc4fe
8f8029d
b0bd79d
a6bc038
61e22e0
750856b
8ad2e06
407b93a
53e65c9
05a9cc6
c095083
5ee49dd
25400ac
0f17458
17fba2d
deb01aa
57da999
9956900
997fb34
e15858e
a6d48f2
f0d4fd8
dae0dd4
938b60e
6895d38
2e9d622
bcde944
d80564d
e48fc99
9033b4e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
@rushatgabhane Have you confirmed if this is the right way as this kind of pattern in API is discouraged?
cc @twisterdotcom
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 can refer the docs for its intended use. we're calling a third party and we have to wait for the response because it contains the auth token that we'll use for navigating
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.
So in this case, we are actually not calling a third party, this is a token generated by our server. That being said we do need to wait for the response before we can take any actions in the app, so I believe that the usage is still correct (since we are redirecting the user)
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.
I think that we need to throw some sort of error here (and line 97) if we don't get the token. Otherwise it will just error out on Spotnana's side right?
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.
@stitesExpensify yes that's a good point 👍
right now, it'll show "Something went wrong" error on spotnana side which I think is pretty good for V1.
I'm not sure where would be a good place to show the error. This method can be called from any component.
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 we throw an error here, we'll have to add try catch everywhere this navigation function is called.
Should we go forward with this approach?
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.
I wasn't thinking an actual throw, but more like a red brick road notification. Maybe for now it's okay to just let Spotnana show an error? I'm not sure that the user would know what to do next though.. cc @twisterdotcom
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.
I think it's fine to leave it as the Spotnana error for now. Can we log it at least?
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.
I think a small pre-design would be nice. I created an issue to handle errors - #43780