You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/07/07 20:20:22 UTC
[GitHub] [incubator-superset] ktmud commented on a change in pull request #9796: feat: return security errors in the SIP-40 format
ktmud commented on a change in pull request #9796:
URL: https://github.com/apache/incubator-superset/pull/9796#discussion_r451119597
##########
File path: superset-frontend/src/components/ErrorMessage/types.ts
##########
@@ -19,13 +19,24 @@
// Keep in sync with superset/views/errors.py
export const ErrorTypeEnum = {
+ // Frontend errors
FRONTEND_CSRF_ERROR: 'FRONTEND_CSRF_ERROR',
FRONTEND_NETWORK_ERROR: 'FRONTEND_NETWORK_ERROR',
FRONTEND_TIMEOUT_ERROR: 'FRONTEND_TIMEOUT_ERROR',
+ // DB Engine errors
GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR',
+ // Viz errors
VIZ_GET_DF_ERROR: 'VIZ_GET_DF_ERROR',
+ UNKNOWN_DATASOURCE_TYPE_ERROR: 'UNKNOWN_DATASOURCE_TYPE_ERROR',
+ FAILED_FETCHING_DATASOURCE_INFO_ERROR:
+ 'FAILED_FETCHING_DATASOURCE_INFO_ERROR',
+
+ // Security access errors
+ TABLE_SECURITY_ACCESS_ERROR: 'TABLE_SECURITY_ACCESS_ERROR',
+ DATASOURCE_SECURITY_ACCESS_ERROR: 'DATASOURCE_SECURITY_ACCESS_ERROR',
+ MISSING_OWNERSHIP_ERROR: 'MISSING_OWNERSHIP_ERROR',
Review comment:
@etr2460 What do you think of removing `_ERROR` suffix for the more specific errors and make it read like natural English? E.g.
```
SupersetError.UNKNOWN_DATASOURCE_TYPE
SupersetError.FAILED_FETCHING_DATASORUCE_INFO
SupersetError.TABLE_ACCESS_DENIED
SupersetError.DATASOURCE_ACCESS_DENITED
SupersetError.MISSING_OWNERSHIP
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org