server: Improve error reporting.