File: exceptions.py

package info (click to toggle)
python-openapi-core 0.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,104 kB
  • sloc: python: 19,979; makefile: 44
file content (18 lines) | stat: -rw-r--r-- 429 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from dataclasses import dataclass
from typing import List

from openapi_core.exceptions import OpenAPIError


class SecurityFinderError(OpenAPIError):
    """Security finder error"""


@dataclass
class SecurityNotFound(SecurityFinderError):
    """Find security error"""

    schemes: List[List[str]]

    def __str__(self) -> str:
        return f"Security not found. Schemes not valid for any requirement: {str(self.schemes)}"