[js] an error message is displayed if hire fails