log internal errors, send InternalErrorException to client