Here are some basic troubleshooting tips to address issues of this kind (if you do not have access to your specific code, reach out to your developer).
- Verify that the code is actually being reached. If it isn't, there may be an error occurring earlier in the chain that you must address first.
- If the code is being reached, check if there has been a change in any of the surrounding code, or the code that occurs before the specific code is reached.
- Check the different versions of libraries you may be using, are there any that may have been upgraded and altered things?