Updated exception handling for server