Closed jurgenbelien closed 4 weeks ago
When a request fails, the data and error are destructured from the response object, but the logging function tries to stringify that response object again, instead of stringifying the error.
data
error
response
See https://github.com/voorhoede/head-start/blob/0de92d6a48232f7d1ddc4e7c3c9c0e326b4944de/src/lib/datocms.ts#L48
When a request fails, the
data
anderror
are destructured from theresponse
object, but the logging function tries to stringify thatresponse
object again, instead of stringifying the error.See https://github.com/voorhoede/head-start/blob/0de92d6a48232f7d1ddc4e7c3c9c0e326b4944de/src/lib/datocms.ts#L48