Handle error when getting submission data.

- Check submission status after searching and raise error message.
- If submission["data"] is nil then default to empty array to avoid nil exception.