I guess an Attribute is for metadata and not runtime concerns. I thought a good pattern might be to verify a role at a Controller action and throw an exception upon a role missing. However, my attempts to catch error messages in middleware here and here, do not catch exceptions thrown from attributes. Lame!
No comments:
Post a Comment