feat: implement specific errors for SQL Lab (#15206)

* RESULTS_BACKEND_NOT_CONFIGURED_ERROR

* DML_NOT_ALLOWED_ERROR

* INVALID_CxAS_QUERY_ERROR

* Fix lint

* Add more tests
This commit is contained in:
Beto Dealmeida
2021-06-23 07:58:20 -07:00
committed by GitHub
parent 216e2b8e8e
commit 4b00c152cc
7 changed files with 281 additions and 41 deletions

View File

@@ -51,6 +51,22 @@ export default function setupErrorMessages() {
ErrorTypeEnum.MISSING_TEMPLATE_PARAMS_ERROR,
ParameterErrorMessage,
);
errorMessageComponentRegistry.registerValue(
ErrorTypeEnum.RESULTS_BACKEND_NOT_CONFIGURED_ERROR,
DatabaseErrorMessage,
);
errorMessageComponentRegistry.registerValue(
ErrorTypeEnum.DML_NOT_ALLOWED_ERROR,
DatabaseErrorMessage,
);
errorMessageComponentRegistry.registerValue(
ErrorTypeEnum.INVALID_CTAS_QUERY_ERROR,
DatabaseErrorMessage,
);
errorMessageComponentRegistry.registerValue(
ErrorTypeEnum.INVALID_CVAS_QUERY_ERROR,
DatabaseErrorMessage,
);
errorMessageComponentRegistry.registerValue(
ErrorTypeEnum.CONNECTION_INVALID_HOSTNAME_ERROR,
DatabaseErrorMessage,