There are various ways to solve this issue:-
KEY-COMMIT trigger :-
BEGIN
:System.Message_Level := 25;
COMMIT;
:System.Message_Level := 0;
END;
and second is at on-error trigger:-
DECLARE
V_Error_Code NUMBER;
V_Error_Text VARCHAR2 (2000);
BEGIN
V_Error_Code := Error_Code;
V_Error_Text := Error_Text;
IF V_Error_Code IN (40401, 40405) THEN
NULL;
ELSE
Show_Error (V_Error_Code);
END IF;
END;
KEY-COMMIT trigger :-
BEGIN
:System.Message_Level := 25;
COMMIT;
:System.Message_Level := 0;
END;
and second is at on-error trigger:-
DECLARE
V_Error_Code NUMBER;
V_Error_Text VARCHAR2 (2000);
BEGIN
V_Error_Code := Error_Code;
V_Error_Text := Error_Text;
IF V_Error_Code IN (40401, 40405) THEN
NULL;
ELSE
Show_Error (V_Error_Code);
END IF;
END;