server on error / on close