Add better error description in js callback