mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
[dashboard] Refactor API using SIP-35 (#9315)
* [dashboard] Refactor API using SIP-35 * [dashboard] Fix, import * [dashboard] more tests * [dashboards] a misc of improvements * [charts] Fix, DAO and tests * [dashboards] small exceptions refactor * [dashboards] lint * [dashboards] Improves comments on base classes * [dashboards] lint
This commit is contained in:
committed by
GitHub
parent
ccf21f6f1b
commit
c34df6b7b3
@@ -14,10 +14,22 @@
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class SupersetException(Exception):
|
||||
status = 500
|
||||
message = ""
|
||||
|
||||
def __init__(self, message: str = "", exception: Optional[Exception] = None):
|
||||
if message:
|
||||
self.message = message
|
||||
self._exception = exception
|
||||
super().__init__(self.message)
|
||||
|
||||
@property
|
||||
def exception(self):
|
||||
return self._exception
|
||||
|
||||
|
||||
class SupersetTimeoutException(SupersetException):
|
||||
|
||||
Reference in New Issue
Block a user