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
{{ message }}
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Right now module use various ways for reporting bad origins, even though the origin recognition APIs are all reusable library code. Some report a &str (of various content), others report a local BadOrigin-like error type.
Instead, there should be a single BadOrigin error (e.g. defined in frame_system) that all ensure_origin/try_origin/ensure_root/ensure_nobody/ensure_signed functions and their ilk use. If modules want to customise the error to something local, then they can with map_err, but a simple ensure_root(origin)? should Just Work.
The text was updated successfully, but these errors were encountered:
Right now module use various ways for reporting bad origins, even though the origin recognition APIs are all reusable library code. Some report a
&str
(of various content), others report a localBadOrigin
-like error type.Instead, there should be a single
BadOrigin
error (e.g. defined inframe_system
) that allensure_origin
/try_origin
/ensure_root
/ensure_nobody
/ensure_signed
functions and their ilk use. If modules want to customise the error to something local, then they can withmap_err
, but a simpleensure_root(origin)?
should Just Work.The text was updated successfully, but these errors were encountered: