@@ -107,6 +107,8 @@ public void createSchedule(CreateScheduleInput input) {
107
107
} else {
108
108
throw new ScheduleException (e );
109
109
}
110
+ } catch (Exception e ) {
111
+ throw new ScheduleException (e );
110
112
}
111
113
}
112
114
@@ -153,7 +155,11 @@ public void backfillSchedule(BackfillScheduleInput input) {
153
155
.setScheduleId (input .getScheduleId ())
154
156
.setPatch (patch )
155
157
.build ();
156
- genericClient .patchSchedule (request );
158
+ try {
159
+ genericClient .patchSchedule (request );
160
+ } catch (Exception e ) {
161
+ throw new ScheduleException (e );
162
+ }
157
163
}
158
164
159
165
@ Override
@@ -164,7 +170,11 @@ public void deleteSchedule(DeleteScheduleInput input) {
164
170
.setNamespace (clientOptions .getNamespace ())
165
171
.setScheduleId (input .getScheduleId ())
166
172
.build ();
167
- genericClient .deleteSchedule (request );
173
+ try {
174
+ genericClient .deleteSchedule (request );
175
+ } catch (Exception e ) {
176
+ throw new ScheduleException (e );
177
+ }
168
178
}
169
179
170
180
@ Override
@@ -175,16 +185,20 @@ public DescribeScheduleOutput describeSchedule(DescribeScheduleInput input) {
175
185
.setScheduleId (input .getScheduleId ())
176
186
.build ();
177
187
178
- DescribeScheduleResponse response = genericClient .describeSchedule (request );
179
- return new DescribeScheduleOutput (
180
- new ScheduleDescription (
181
- input .getScheduleId (),
182
- scheduleRequestHeader .protoToScheduleInfo (response .getInfo ()),
183
- scheduleRequestHeader .protoToSchedule (response .getSchedule ()),
184
- Collections .unmodifiableMap (
185
- SearchAttributesUtil .decode (response .getSearchAttributes ())),
186
- response .getMemo ().getFieldsMap (),
187
- clientOptions .getDataConverter ()));
188
+ try {
189
+ DescribeScheduleResponse response = genericClient .describeSchedule (request );
190
+ return new DescribeScheduleOutput (
191
+ new ScheduleDescription (
192
+ input .getScheduleId (),
193
+ scheduleRequestHeader .protoToScheduleInfo (response .getInfo ()),
194
+ scheduleRequestHeader .protoToSchedule (response .getSchedule ()),
195
+ Collections .unmodifiableMap (
196
+ SearchAttributesUtil .decode (response .getSearchAttributes ())),
197
+ response .getMemo ().getFieldsMap (),
198
+ clientOptions .getDataConverter ()));
199
+ } catch (Exception e ) {
200
+ throw new ScheduleException (e );
201
+ }
188
202
}
189
203
190
204
@ Override
@@ -198,8 +212,11 @@ public void pauseSchedule(PauseScheduleInput input) {
198
212
.setScheduleId (input .getScheduleId ())
199
213
.setPatch (patch )
200
214
.build ();
201
-
202
- genericClient .patchSchedule (request );
215
+ try {
216
+ genericClient .patchSchedule (request );
217
+ } catch (Exception e ) {
218
+ throw new ScheduleException (e );
219
+ }
203
220
}
204
221
205
222
@ Override
@@ -216,7 +233,11 @@ public void triggerSchedule(TriggerScheduleInput input) {
216
233
.setScheduleId (input .getScheduleId ())
217
234
.setPatch (patch )
218
235
.build ();
219
- genericClient .patchSchedule (request );
236
+ try {
237
+ genericClient .patchSchedule (request );
238
+ } catch (Exception e ) {
239
+ throw new ScheduleException (e );
240
+ }
220
241
}
221
242
222
243
@ Override
@@ -230,7 +251,11 @@ public void unpauseSchedule(UnpauseScheduleInput input) {
230
251
.setScheduleId (input .getScheduleId ())
231
252
.setPatch (patch )
232
253
.build ();
233
- genericClient .patchSchedule (request );
254
+ try {
255
+ genericClient .patchSchedule (request );
256
+ } catch (Exception e ) {
257
+ throw new ScheduleException (e );
258
+ }
234
259
}
235
260
236
261
@ Override
@@ -249,6 +274,10 @@ public void updateSchedule(UpdateScheduleInput input) {
249
274
.setRequestId (UUID .randomUUID ().toString ())
250
275
.setSchedule (scheduleRequestHeader .scheduleToProto (schedule .getSchedule ()))
251
276
.build ();
252
- genericClient .updateSchedule (request );
277
+ try {
278
+ genericClient .updateSchedule (request );
279
+ } catch (Exception e ) {
280
+ throw new ScheduleException (e );
281
+ }
253
282
}
254
283
}
0 commit comments