KN-6999 Modified API exception handling