added task index to the error message
added noPostData and timeout 504 tests
fixed test, added timeout code
fixed bad code