Skip to content

Commit

Permalink
fix: use snake_case for error_type (apache#9835)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Ritter authored and auxten committed Nov 20, 2020
1 parent d0ca49f commit 5488cf1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('getClientErrorObject()', () => {
const jsonError = {
errors: [
{
errorType: ErrorTypeEnum.GENERIC_DB_ENGINE_ERROR,
error_type: ErrorTypeEnum.GENERIC_DB_ENGINE_ERROR,
extra: { engine: 'presto', link: 'https://www.google.com' },
level: 'error',
message: 'presto error: test error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function ErrorMessageWithStackTrace({
// Check if a custom error message component was registered for this message
if (error) {
const ErrorMessageComponent = getErrorMessageComponentRegistry().get(
error.errorType,
error.error_type,
);
if (ErrorMessageComponent) {
return <ErrorMessageComponent error={error} />;
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/components/ErrorMessage/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export type ErrorType = ValueOf<typeof ErrorTypeEnum>;
export type ErrorLevel = 'info' | 'warning' | 'error';

export type SupersetError = {
errorType: ErrorType;
error_type: ErrorType;
extra: Record<string, any> | null;
level: ErrorLevel;
message: string;
Expand Down

0 comments on commit 5488cf1

Please sign in to comment.