Embed field returning incorrect type error

Hi,

I am using the embed field to add Apple Music urls to a website I am building. This functionality was working some time ago for Apple Music but now isn't. It simply returns the error "There is no embed data available". On further inspection within the developer tools I can see that the network traffic is showing that the url does return valid data from the API, however it is failing at the Zod type validation level. Where the it is expecting a number for the thumbnail_width property but the embed data is returning a string. In this case the Apple Music oembed data is returning "300".

This seems like a relatively easy fix, possibly just a matter of changing the Zod validation schema to accept number | string for the thumbnail heigh and width properties. Would be great to get this fixed as it was something that was previously working.

Data Response from API:

Console Error Cause by Zod Validation:

Hi @rod , thanks for raising the issue. I'll create a ticket for the team and I'll update this thread when it's been fixed.

Best,
Guy

1 Like