wsapi: don't clear session on error