blob: df730a4629ee099f9a76be4d8c18d8dc3f2390f9 [file] [log] [blame]
Gulsum Atici293a5152023-03-22 16:08:03 +03001# Copyright 2023 Canonical Ltd.
2
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12# implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Gulsum Atici293a5152023-03-22 16:08:03 +030016from temporalio.exceptions import ApplicationError
17
18
Gulsum Atici654c3772023-03-23 15:59:56 +030019class NonRetryableException(ApplicationError):
Gulsum Atici293a5152023-03-22 16:08:03 +030020 def __init__(self, message):
Gulsum Atici654c3772023-03-23 15:59:56 +030021 super().__init__(message, non_retryable=True)
Gulsum Atici293a5152023-03-22 16:08:03 +030022
23
Gulsum Atici654c3772023-03-23 15:59:56 +030024class TimeOutError(ApplicationError):
25 def __init__(self, message):
26 super().__init__(message)