-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return error when domain is not found
- Loading branch information
1 parent
7605fe8
commit 39af61e
Showing
4 changed files
with
172 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from __future__ import annotations | ||
|
||
from pydantic import BaseModel, Field | ||
|
||
import dataclasses | ||
|
||
from enum import Enum | ||
|
||
|
||
class ResourceNotFoundType(str, Enum): | ||
"""Type of resource that was not found.""" | ||
ACTION = "ACTION" | ||
DOMAIN = "DOMAIN" | ||
|
||
|
||
class ResourceNotFound(BaseModel): | ||
action_name: str = Field(alias="action_name") | ||
message: str = Field(alias="message") | ||
resource_type: ResourceNotFoundType = Field(alias="resource_type") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters