when session.save error should return error

1
Merge pull request #755 from coolme200/fix-save-error

when session.save error should return error