As far as I know "error_code" is not returned by any API but I could be wrong.
I am just afraid that the exception message would then show 'nil' when printing the value of js['error_code'].