Skip to content

Commit

Permalink
Make InvalidSignatureError's code property optional
Browse files Browse the repository at this point in the history
  • Loading branch information
oleiade committed Dec 7, 2022
1 parent 83889b8 commit 8070506
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build/_signature.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/_signature.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/aws.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/aws.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/kms.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/kms.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/s3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/s3.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/secrets-manager.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/secrets-manager.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/ssm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/ssm.min.js.map

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions src/internal/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ import { parseHTML } from 'k6/html'
* * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts
*/
export class AWSError extends Error {
code: string
/**
* Error code issued by the service (if any)
*/
code?: string

/**
* Create an AWSError
*
* @param {string} message - A longer human readable error message.
* @param {string} code - A unique short code representing the error that was emitted
* @param {string?} code - A unique short code representing the error that was emitted
*/
constructor(message: string, code: string) {
constructor(message: string, code?: string) {
super(message)
this.name = 'AWSError'
this.code = code
Expand Down

0 comments on commit 8070506

Please sign in to comment.