Sorry for the delayed response on this. I think you're right, it seemed like it was swallowing the error instead of showing it. I've adjusted my code and everything works as intended.
I believe this issue can be closed!