@vizamodo/aws-sts-core 0.4.12 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/sts/issue.js +5 -13
  2. package/package.json +1 -1
package/dist/sts/issue.js CHANGED
@@ -131,19 +131,11 @@ async function fetchCredentials(input) {
131
131
  "X-Amz-X509": normalizedCert,
132
132
  "Authorization": `${ALGORITHM} Credential=${certSerialDec}/${credentialScope}, SignedHeaders=${signedHeaders}, Signature=${signatureHex}`,
133
133
  });
134
- // FIX 4: catch network errors as aws_unreachable.
135
- let res;
136
- try {
137
- res = await fetch(`https://${host}${PATH}`, {
138
- method: "POST",
139
- headers: finalHeaders,
140
- body,
141
- });
142
- }
143
- catch (err) {
144
- console.warn("[aws-unreachable]", { region, err });
145
- throw new InternalError("aws_unreachable");
146
- }
134
+ const res = await fetch(`https://${host}${PATH}`, {
135
+ method: "POST",
136
+ headers: finalHeaders,
137
+ body,
138
+ });
147
139
  if (!res.ok) {
148
140
  console.warn("[aws-rejected]", { status: res.status, region });
149
141
  throw new InternalError("aws_rejected");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizamodo/aws-sts-core",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "description": "Pure AWS STS + SigV4 (X509 Roles Anywhere) core logic",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",