server handling exceptions