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.
Description
This introduces a new
timeout
option toapiv2
. This can (and should) be used rather than providing signal controllers and managing that logic in other places.I updated an existing spot (proxying traffic through Hosting emulator) that used a signal to use the timeout instead. I also updated the project management API for listing projects to use the new timeout mechanism in the new apiv2 (this ended up requiring updating a bunch of tests - and for kicks,
nock
- but I think it was worth it).Interesting decision I made: I did not expose
timeout
on the verb methods. Looking at the type definitions, I couldn't convince myself thatVerbOptions
was correct. Maybe putting it inClientHandlingOptions
would work (since that ends up being an extension of other options), but I wasn't thrilled with that since it's an option of the request, not the handling of it. Up for opinions, but it's not too much of a hassle to change later either.Scenarios Tested
projects:list
with a hardcoded short timeout to see the failure.