From e07eefb45e47655fcfe7f9f2a6d35860a43e93a7 Mon Sep 17 00:00:00 2001 From: Hasan Jamil <78340806+hjamil-24@users.noreply.github.com> Date: Thu, 1 Jun 2023 19:30:21 +0530 Subject: [PATCH] feat(oracle): add new error messages introduced in new driver version (#16075) Co-authored-by: Rik Smale <13023439+WikiRik@users.noreply.github.com> --- src/dialects/oracle/connection-manager.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/dialects/oracle/connection-manager.js b/src/dialects/oracle/connection-manager.js index c012bcbcff13..44e791236304 100644 --- a/src/dialects/oracle/connection-manager.js +++ b/src/dialects/oracle/connection-manager.js @@ -128,14 +128,29 @@ export class OracleConnectionManager extends AbstractConnectionManager { case 'ORA-12154': // ORA-12154: TNS: Could not resolve the connect identifier specified case 'ORA-12505': // ORA-12505: TNS: Listener does not currently know of SID given in connect descriptor case 'ORA-12514': // ORA-12514: TNS: Listener does not currently know of service requested in connect descriptor + case 'NJS-511': // NJS-511: connection refused + case 'NJS-516': // NJS-516: No Config Dir + case 'NJS-517': // NJS-517: TNS Entry not found + case 'NJS-520': // NJS-520: TNS Names File missing throw new SequelizeErrors.ConnectionRefusedError(err); case 'ORA-28000': // ORA-28000: Account locked case 'ORA-28040': // ORA-28040: No matching authentication protocol case 'ORA-01017': // ORA-01017: invalid username/password; logon denied + case 'NJS-506': // NJS-506: TLS Auth Failure throw new SequelizeErrors.AccessDeniedError(err); case 'ORA-12541': // ORA-12541: TNS: No listener + case 'NJS-503': // NJS-503: Connection Incomplete + case 'NJS-508': // NJS-508: TLS HOST MATCH Failure + case 'NJS-507': // NJS-507: TLS DN MATCH Failure throw new SequelizeErrors.HostNotReachableError(err); + case 'NJS-512': // NJS-512: Invalid Connect String Parameters + case 'NJS-515': // NJS-515: Invalid EZCONNECT Syntax + case 'NJS-518': // NJS-518: Invald ServiceName + case 'NJS-519': // NJS-519: Invald SID + throw new SequelizeErrors.InvalidConnectionError(err); case 'ORA-12170': // ORA-12170: TNS: Connect Timeout occurred + case 'NJS-510': // NJS-510: Connect Timeout occurred + throw new SequelizeErrors.ConnectionTimedOutError(err); default: throw new SequelizeErrors.ConnectionError(err);