prosody fixed the error type
handle buggy version for backward compat
Merge pull request #36 from fippo/master

prosody fixed the error type