Hi,
I am using Uploader component with asp.net core 7.0 web api as backend. Upload and everything works fine but sometimes I need to return a custom error message.
No matter how I tried to do it, be it return BadRequest("My message"), or return Problem(...) or return StatusCode(...) this is what I get as part of onUploadFailure args:
response: {
"readyState": 4,
"statusCode": 400,
"statusText": "Bad Request",
"headers": "access-control-allow-origin: *\r\nconnection: keep-alive\r\ncontent-type: text/plain; charset=utf-8\r\ndate: Mon, 25 Sep 2023 19:52:16 GMT\r\nserver: Kestrel\r\ntransfer-encoding: chunked\r\nx-powered-by: Express\r\n",
"withCredentials": false
}Status text is always generic based on statusCode and not what I try to send from server. Is it possible to read custom error message?
Just to note, network tab in google chrome dev tools shows proper response with my custom message.