rest-framework icon indicating copy to clipboard operation
rest-framework copied to clipboard

[14.0] Cannot set CORS header when using an error

Open Lukwos opened this issue 1 year ago • 0 comments

Module

base_rest

Describe the bug

When I use cors (_default_cors in controller or cors param in route) I get the appropriate header when I return a value in my service function but when I want to throw a AccessDenied error I don't find the cors header. I don't know if it's supported to use error to send http error status like 403 in base_rest

To Reproduce

raise odoo.exceptions.AccesDenied in service function

Lukwos avatar Oct 01 '24 12:10 Lukwos