Skip to content
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

feat(experimentalIdentityAndAuth): add internal error and success handlers to HttpSigner and QOL changes #1080

Merged
merged 3 commits into from
Nov 21, 2023

Conversation

syall
Copy link
Contributor

@syall syall commented Nov 21, 2023

Issue #, if available:

N/A.

Description of changes:

Add internal error and success handlers to HttpSigner for experimentalIdentityAndAuth.

Also add some quality of life improvements:

  • Log error message per test client for build failures
  • Copy getSmithyContext() and normalizeProvider() to @smithy/core

If one or more of the packages in the /packages directory has been modified, be sure yarn changeset add has been run and its output has
been committed and included in this pull request. See CONTRIBUTING.md.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@syall syall force-pushed the ts-ia-core-ts-changes branch 2 times, most recently from 0bc836e to 3a1f05b Compare November 21, 2023 17:18
@syall syall marked this pull request as ready for review November 21, 2023 17:19
@syall syall requested review from a team as code owners November 21, 2023 17:19
@syall syall changed the title feat(experimentalIdentityAndAuth): core TypeScript changes feat(experimentalIdentityAndAuth): add internal error and success handlers to HttpSigner and QOL changes Nov 21, 2023
@syall syall force-pushed the ts-ia-core-ts-changes branch from 3a1f05b to 02fc3b8 Compare November 21, 2023 17:23
* @internal
*/
export interface SuccessHandler {
(httpResponse: HttpResponse | unknown, signingProperties: Record<string, unknown>): void;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signingProperties should have a type. It can be a record too (&), but it should also indicate that it tends to have properties like name, in, etc.

Copy link
Contributor Author

@syall syall Nov 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the generic HttpSigner which has no context for the properties of any specific HttpAuthScheme.

I think specific concrete implementations of HttpSigner can provide more type hints, but I can add that in a follow-up PR.

@syall syall force-pushed the ts-ia-core-ts-changes branch from 02fc3b8 to 2b09607 Compare November 21, 2023 17:41
@syall syall merged commit 9579a9a into smithy-lang:main Nov 21, 2023
@syall syall deleted the ts-ia-core-ts-changes branch November 21, 2023 18:07
sugmanue pushed a commit to sugmanue/smithy-typescript that referenced this pull request Mar 4, 2024
* chore: prettify smithy-client

* chore: prettier-ignore months array

* chore: fixes for issues happened during precommit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants