-
Notifications
You must be signed in to change notification settings - Fork 481
API error when using custom schema formats and sending wrong value #1235
Copy link
Copy link
Closed
Labels
Description
Expected behaviour:
Get our "regular" validation error reply when non matching values are used with JSON scheme custom formats
Actual behaviour:
Generic error from API:
--------------------------------------------------------------------------------
ERROR in app [C:\Python27\lib\site-packages\flask\app.py:1587]:
Exception on /series_list/1/series/ [POST]
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\flask\app.py", line 1988, in wsgi_app
response = self.full_dispatch_request()
File "C:\Python27\lib\site-packages\flask\app.py", line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Python27\lib\site-packages\flask_restful\__init__.py", line 271, in error_router
return original_handler(e)
File "C:\Python27\lib\site-packages\flask_cors\extension.py", line 188, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Python27\lib\site-packages\flask\app.py", line 1531, in handle_user_exception
assert exc_value is e
AssertionError
Steps to reproduce:
Some API endpoint utilize some of our custom JSON schema formats, like quality:
https://github.com/Flexget/Flexget/blob/develop/flexget/plugins/api/movie_queue.py#L79
Sending an illegal value to that format causes a crash
Reactions are currently unavailable