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

Add install_requires argument in setup.py file #7

Open

Conversation

@ragnarokatz
Copy link

ragnarokatz commented Oct 7, 2019

referenced issue #2

ragnarokatz added 2 commits Oct 9, 2019
…remove install of requirements.txt from travis yaml
@eric-s-s

This comment has been minimized.

Copy link
Owner

eric-s-s commented Oct 9, 2019

excellent! a bug is found! perhaps there was a newer version of one of the libraries that now behaves differently. i will try to look into this in the next few days, or if you want to hunt it down, that would be great!

@eric-s-s

This comment has been minimized.

Copy link
Owner

eric-s-s commented Oct 11, 2019

I found the issue. All regular exceptions are now converted to InternalServerError connections within the app

https://flask.palletsprojects.com/en/1.1.x/errorhandling/#handling

this might need a re-write to deal with new situation

@eric-s-s

This comment has been minimized.

Copy link
Owner

eric-s-s commented Oct 11, 2019

@ragnarokatz

This comment has been minimized.

Copy link
Author

ragnarokatz commented Oct 11, 2019

@eric-s-s correct. This exception's the root cause is here:

test_bind_json_error_handlers_non_HTTPException_error_as_acting_in_app (tests.test_bind_json_error_handler.TestBindJSONErrorHandler) ... [2019-10-09 18:29:21,297] ERROR in app: Exception on /error/other [GET]
Traceback (most recent call last):
  File "/home/travis/build/eric-s-s/bind_json_error_handlers/tests/test_bind_json_error_handler.py", line 20, in get_errors
    raise error_dict[error_name](description=TEST_MESSAGE)
KeyError: 'other'

then flask just took this unhandled exception and threw a generic 500 internal server error instead.

@eric-s-s

This comment has been minimized.

Copy link
Owner

eric-s-s commented Oct 12, 2019

If you're up for fixing the problem, go for it! I'd still like to send information about the unhandled exception. If not, let me know and I'll get around to it in a few days.

@ragnarokatz

This comment has been minimized.

Copy link
Author

ragnarokatz commented Oct 17, 2019

@eric-s-s hey, I gave it a try.

in test case test_bind_json_error_handlers_non_HTTPException_error_as_acting_in_app,
the list of default_exceptions from werkzeug.exceptions does not include the key other.

Here are the available keys from default_exceptions:

['BadRequest', 'Unauthorized', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLarge', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'ImATeapot', 'UnprocessableEntity', 'Locked', 'FailedDependency', 'PreconditionRequired', 'TooManyRequests', 'RequestHeaderFieldsTooLarge', 'UnavailableForLegalReasons', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported']
@ragnarokatz

This comment has been minimized.

Copy link
Author

ragnarokatz commented Oct 17, 2019

As a result of this, the test case test_create_test_app_TypeError should fail as well. it's just the test hasn't gotten to that stage yet.

for a solution, should I just add 'other' as a key to the dictionary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.