Skip to content

Commit

Permalink
Return a proper response when the request is too big
Browse files Browse the repository at this point in the history
  • Loading branch information
vheon committed May 7, 2016
1 parent 141c97b commit 1179e66
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions ycmd/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def DebugInfo():


# The type of the param is Bottle.HTTPError
@app.error( http.client.REQUEST_ENTITY_TOO_LARGE )
@app.error( http.client.INTERNAL_SERVER_ERROR )
def ErrorHandler( httperror ):
body = _JsonResponse( BuildExceptionResponse( httperror.exception,
Expand Down
1 change: 0 additions & 1 deletion ycmd/tests/misc_handlers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def MiscHandlers_EventNotification_ReturnJsonOnBigFileError_test( app ):
app.post_json( '/event_notification', event_data, expect_errors = True ).json



@SharedYcmd
def MiscHandlers_FilterAndSortCandidates_Basic_test( app ):
candidate1 = { 'prop1': 'aoo', 'prop2': 'bar' }
Expand Down

0 comments on commit 1179e66

Please sign in to comment.