Skip to content

Enhancement errors update#35

Merged
BenjamenMeyer merged 5 commits into
masterfrom
enhancement_errors_update
May 29, 2015
Merged

Enhancement errors update#35
BenjamenMeyer merged 5 commits into
masterfrom
enhancement_errors_update

Conversation

@BenjamenMeyer

Copy link
Copy Markdown
Member
  • Use specific error codes for certain events within StackInABox to make debugging easier
    • returns 597 if the service is unknown
    • returns 596 if an unhandled exception occurred within the service
    • returns 595 if the service did not recognize the route
  • Return 405 if the URI is handled but the specific METHOD on the URI is not.

BenjamenMeyer and others added 4 commits May 28, 2015 21:53
- StackInABox was returning 500 when it failed to find a matching route. This changes that specific error to 599 so it is clearer to the tester that it is a routing issue instead of a service issue.
- For StackInABoxService, return 405 if the method is not implemented
- For StackInABox, return 599 if the route is unknown, or 598 if the internal service generated an exception
- HTTPretty apparently requires mapping of response codes to its internal list of statuses with text values.
- The 598 and 599 values conflicted in meanings with values HTTPretty was using, and 597 did not exist.
- Updated the StackInABox status values to not conflict with HTTPretty
- Updated to auto-insert the values into the list maintained by HTTPretty if the values do not already exist

Note: We may want to adjust them again before the 1.0 release to provide a buffer between 598 and our own codes
@BenjamenMeyer BenjamenMeyer self-assigned this May 29, 2015
@BenjamenMeyer BenjamenMeyer added this to the 0.9 milestone May 29, 2015
@coveralls

Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling 2aa943c on enhancement_errors_update into * on master*.

Conflicts:
	tools/test-requirements.txt

- Added Upate for 'responses', version 0.4.0 supports Py3
- Updated minimum coverage to 88%
@coveralls

Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling 9ca7915 on enhancement_errors_update into * on master*.

@BenjamenMeyer

Copy link
Copy Markdown
Member Author

HTTPretty is having issues on TravisCI, but works locally. Merging anyway as it is not something we can solve.

BenjamenMeyer added a commit that referenced this pull request May 29, 2015
@BenjamenMeyer BenjamenMeyer merged commit d6c9a34 into master May 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants