Skip to content

Commit

Permalink
Ensure error types are exposed to users
Browse files Browse the repository at this point in the history
  • Loading branch information
oleiade committed Oct 8, 2024
1 parent 5e091ef commit a562863
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 18 deletions.
9 changes: 9 additions & 0 deletions src/event-bridge.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
export { AWSConfig, InvalidAWSConfigError } from './internal/config'
export {
AWSError,
NetworkError,
GeneralError,
DNSError,
TCPError,
TLSError,
HTTP2Error,
} from './internal/error'
export { EventBridgeClient, EventBridgeServiceError } from './internal/event-bridge'
export { InvalidSignatureError } from './internal/signature'
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
// Re-Export public symbols
export {
AWSError,
NetworkError,
GeneralError,
DNSError,
TCPError,
TLSError,
HTTP2Error,
} from './internal/error'
export { InvalidSignatureError } from './internal/signature'
export { AWSConfig, InvalidAWSConfigError } from './internal/config'
export { AMZ_CONTENT_SHA256_HEADER, UNSIGNED_PAYLOAD } from './internal/constants'
Expand Down
25 changes: 11 additions & 14 deletions src/kinesis.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
// Import only symbols we wish to re-export publicly
import { AWSConfig, InvalidAWSConfigError } from './internal/config'
import { InvalidSignatureError } from './internal/signature'
import { KinesisClient, KinesisServiceError } from './internal/kinesis'

// Re-Export public symbols
export { AWSConfig, InvalidAWSConfigError } from './internal/config'
export {
InvalidSignatureError,
// Aws Config
AWSConfig,
InvalidAWSConfigError,
// Kinesis
KinesisClient,
KinesisServiceError,
}
AWSError,
NetworkError,
GeneralError,
DNSError,
TCPError,
TLSError,
HTTP2Error,
} from './internal/error'
export { InvalidSignatureError } from './internal/signature'
export { KinesisClient, KinesisServiceError } from './internal/kinesis'
9 changes: 9 additions & 0 deletions src/kms.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
// Re-Export public symbols
export { AWSConfig, InvalidAWSConfigError } from './internal/config'
export {
AWSError,
NetworkError,
GeneralError,
DNSError,
TCPError,
TLSError,
HTTP2Error,
} from './internal/error'
export { KMSClient, KMSDataKey, KMSServiceError } from './internal/kms'
export { InvalidSignatureError } from './internal/signature'
14 changes: 10 additions & 4 deletions src/lambda.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
// Re-Export public symbols
export { AWSConfig, InvalidAWSConfigError } from './internal/config'
export { InvalidSignatureError } from './internal/signature'
export {
LambdaInvocationError,
LambdaClient
} from './internal/lambda'
AWSError,
NetworkError,
GeneralError,
DNSError,
TCPError,
TLSError,
HTTP2Error,
} from './internal/error'
export { InvalidSignatureError } from './internal/signature'
export { LambdaInvocationError, LambdaClient } from './internal/lambda'
9 changes: 9 additions & 0 deletions src/s3.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
// Re-Export public symbols
export { AWSConfig, InvalidAWSConfigError } from './internal/config'
export {
AWSError,
NetworkError,
GeneralError,
DNSError,
TCPError,
TLSError,
HTTP2Error,
} from './internal/error'
export { InvalidSignatureError } from './internal/signature'
export {
S3Bucket,
Expand Down
9 changes: 9 additions & 0 deletions src/secrets-manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
// Re-Export public symbols
export { AWSConfig, InvalidAWSConfigError } from './internal/config'
export {
AWSError,
NetworkError,
GeneralError,
DNSError,
TCPError,
TLSError,
HTTP2Error,
} from './internal/error'
export { InvalidSignatureError } from './internal/signature'
export {
Secret,
Expand Down
9 changes: 9 additions & 0 deletions src/signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ export {
UNSIGNED_PAYLOAD,
} from './internal/constants'
export { AWSConfig, InvalidAWSConfigError } from './internal/config'
export {
AWSError,
NetworkError,
GeneralError,
DNSError,
TCPError,
TLSError,
HTTP2Error,
} from './internal/error'
export { Endpoint } from './internal/endpoint'
export { InvalidSignatureError } from './internal/signature'
export { SignatureV4 } from './internal/signature'
9 changes: 9 additions & 0 deletions src/sqs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
// Re-Export public symbols
export { AWSConfig, InvalidAWSConfigError } from './internal/config'
export {
AWSError,
NetworkError,
GeneralError,
DNSError,
TCPError,
TLSError,
HTTP2Error,
} from './internal/error'
export { InvalidSignatureError } from './internal/signature'
export { SQSClient, SQSServiceError } from './internal/sqs'
9 changes: 9 additions & 0 deletions src/ssm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
// Re-export public symbols
export { AWSConfig, InvalidAWSConfigError } from './internal/config'
export {
AWSError,
NetworkError,
GeneralError,
DNSError,
TCPError,
TLSError,
HTTP2Error,
} from './internal/error'
export { InvalidSignatureError } from './internal/signature'
export {
SystemsManagerClient,
Expand Down

0 comments on commit a562863

Please sign in to comment.