You need to trace error here:
- in the log with something detailed if available (log stack trace, for ex.)
- as a meaningful js error for the uer.