actix / actix/actix-extras

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

オープン
#472 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
A-cors C-improvement
主要言語
Rust
スター
889
フォーク
224
平均マージ
9時間 37分
マージ済み PR(30日)
20

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。