actix / actix/actix-extras

Is it possible to respond Cors errors with a custom error type?

Aperta
#472 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
A-cors C-improvement
Lingua principale
Rust
Stelle
889
Fork
224
Merge medio
9h 37m
PR unite (30g)
20

Descrizione

Your issue may already be reported! Please search on the [actix-extras issue tracker](https://github.com/actix/actix-extras/issues) before creating one.

## Expected Behavior

I'm looking for a way to use my own custom error struct for every api call. This means that even when responding to Cors errors, I wanted to be able to use my custom struct instead of using the provided `CorsError`
Is there a built in way of doing that?

## Current Behavior

All cors errors are returned using the `CorsError` struct

## Possible Solution

I'm not super familiar with actix in general so there might be ways to acomplish this via middlewares?

Thanks in advance.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.