Skip to content

Commit

Permalink
chore: improve cors origin error message (#2125)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonGriggs authored Nov 11, 2024
1 parent b60dc53 commit 11e73ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const handleError = (error: unknown) => {
/* eslint-disable no-console */
if (isCorsOriginError(error)) {
console.warn(
`Sanity Live is unable to connect to the Sanity API as it's not in the list over allowed origins for your project.`,
`Sanity Live is unable to connect to the Sanity API as the current origin - ${window.origin} - is not in the list of allowed CORS origins for this Sanity Project.`,
error.addOriginUrl && `Add it here:`,
error.addOriginUrl?.toString(),
)
Expand Down

0 comments on commit 11e73ae

Please sign in to comment.