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
As a general rule, classes should fall into two distinct categories:
Classes that have functions named after HTTP verbs, and (basically) nothing else
Classes that don't know anything about HTTP verbs or protocol details
Rather than self.abort, raise a variety of typed exceptions. This would be a better, drop-in replacement for what self.abort does anyway. At the very top, and/or whichever layers are appropriate, catch typed exceptions and handle a JSON error return there.