Fixed error reporting (500 to client + stacktrace on server)