From 1a16c493d1892b2753874202a150ed29f3fe1839 Mon Sep 17 00:00:00 2001 From: AAfghahi <48933336+AAfghahi@users.noreply.github.com> Date: Thu, 1 Jul 2021 12:57:26 -0400 Subject: [PATCH] fix: error mapping in database connection (#15504) * fix: add icons (#15122) * added alerts * revisions * added icon * spinner * added to error map --- .../src/views/CRUD/data/database/DatabaseModal/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx index 14f9b7a5996c1..411b72d014d16 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx @@ -90,7 +90,8 @@ const errorAlertMapping = { description: 'Please verify that port is open to connect.', }, CONNECTION_INVALID_PORT_ERROR: { - message: 'The port must be a whole number less than or equal to 65535.', + message: 'Invalid Port Number', + description: 'The port must be a whole number less than or equal to 65535.', }, CONNECTION_ACCESS_DENIED_ERROR: { message: 'Invalid account information', @@ -100,6 +101,10 @@ const errorAlertMapping = { message: 'Invalid account information', description: 'Either the username or password is incorrect.', }, + INVALID_PAYLOAD_SCHEMA: { + message: 'Incorrect Fields', + description: 'Please make sure all fields are filled out correctly', + }, }; interface DatabaseModalProps { addDangerToast: (msg: string) => void;