You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thanks for the amazing framework.
I'm struggling here regarding returning error to clients, like 404 not found.
If i use the framework error engine this way: res.status(404).error('Not found')
Then in clients like Chrome we always get the bellow cors issue:
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled
And belive me i have all the cors stuff in the right place.
In the other hand if i use this way: res.status(404).json('Not found')
Then everthing is fine, i got a 404 in Chrome
I'm i doing something wrong ?
Thanks in advance,
Luiz
The text was updated successfully, but these errors were encountered:
Hey Jeremy,
First of all thanks for the amazing framework.
I'm struggling here regarding returning error to clients, like 404 not found.
If i use the framework error engine this way: res.status(404).error('Not found')
Then in clients like Chrome we always get the bellow cors issue:
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled
And belive me i have all the cors stuff in the right place.
In the other hand if i use this way: res.status(404).json('Not found')
Then everthing is fine, i got a 404 in Chrome
I'm i doing something wrong ?
Thanks in advance,
Luiz
The text was updated successfully, but these errors were encountered: