Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] HTTP 207 is not supported #58

Open
RishiDiwanTT opened this issue Jul 24, 2023 · 0 comments
Open

[BUG] HTTP 207 is not supported #58

RishiDiwanTT opened this issue Jul 24, 2023 · 0 comments

Comments

@RishiDiwanTT
Copy link

Describe the bug
WebDav HTTP code 207 [link] is not supported.

To Reproduce
Steps to reproduce the behavior:

  • Python code to reproduce the error
from flask_pydantic_spec import Response
from pydantic import BaseModel

class ResponseModel(BaseModel):
    status: str

Response(HTTP_207=ResponseModel)

Expected behavior
A clear and concise description of what you expected to happen.
HTTP 207 should be supported.

Error Message
Paste the error message.

Traceback (most recent call last):
  File "/home/rishi/workspace/lyrasis/circulation/repl_misc.py", line 21, in <module>
    Response(HTTP_207=ResponseModel)
  File "/home/rishi/.cache/pypoetry/virtualenvs/palace_manager-GfFmkM1k-py3.9/lib/python3.9/site-packages/flask_pydantic_spec/types.py", line 50, in __init__
    assert key in DEFAULT_CODE_DESC, "invalid HTTP status code"
AssertionError: invalid HTTP status code

Desktop (please complete the following information):

  • OS: Linux
  • Version Ubuntu 20.04

Python Information (please complete the following information):

  • Python Version 3.9.5
  • Library Version 0.4.5

Additional context
Add any other context about the problem here.
207 Multi Status is not part of the IETF http status codes spec, but is an addition in the WebDav spec (linked above).

@RishiDiwanTT RishiDiwanTT changed the title [BUG] [BUG] HTTP 207 is not supported Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant