Inlined the serveError() function.