`JError` is deprecated. We should not use it for new code. You should use exception handling here instead