I am trying to reduce the length of the text that I have requested from
the API with the 'slice' method. but it is throwing an error of
'Cannot read property 'slice' of undefined.
I am trying to reduce the length of the text that I have requested from
the API with the 'slice' method. but it is throwing an error of
'Cannot read property 'slice' of undefined.
Cannot read property 'slice' of undefined
means that your jobDetails.job_description
property is not of type string, but of type undefined at runtime. Make sure you have that property at least defined as an empty string.