check for document.error.code
Merge pull request #3 from Lnmix/sqsErrorLogging

check for document.error.code