APM RUM JS Does not capture the errors

i am using latest version of rum js front end .

I have create simple rum js front end and try to set the labels to the if transaction exist then added the label in try {} and in catch(error) if and set the label only . then i am not aware if i load some time the .

its not capturing that and what type of errors mostly captured by js automatically ?