-
Notifications
You must be signed in to change notification settings - Fork 634
Closed
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
The AWS SDK v3 type definitions for EventBridge Scheduler's ResourceNotFoundException
are not properly exposed, forcing unsafe type casting to handle this common error case.
Current workaround:
if ((error as any).name === 'ResourceNotFoundException')
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/client-scheduler: ^3.716.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
22
Reproduction Steps
import { ResourceNotFoundException, GetScheduleCommand } from '@aws-sdk/client-scheduler';
try {
await scheduler.send(new GetScheduleCommand({ Name: 'non-existent' }));
} catch (error) {
// Have to use unsafe casting
if (error instanceof ResourceNotFoundException) {
// Handle missing schedule
console.log("hello world")
}
}
Observed Behavior
ResourceNotFoundException: Schedule non-existent does not exist.
Expected Behavior
logging hello worl
Possible Solution
No response
Additional Information/Context
No response
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.