add try-catch at decodeURIComponent