解决Cannot set headers after they are sent to the client

NoSuchKey