Skip to content

Commit

Permalink
Fix return overrides to override error bodies (#2815)
Browse files Browse the repository at this point in the history
The previous PR #2731 contained an error, and always forced return custom error: which brakes backward compatibility.
In this PR I added tests covering all return overrides functionality and normalized its behavior for JSVM and Python.

Additionally, it use reverse logic now, and plugin needs set `ReturnOverrides.OverrideError` (JS) or `return_overrides.override_error` (Python) to `true` in order to override the body of response.

Additionally, I renamed `response_error` field to `response_body`, because it makes way more sense.
The old field still can be set for backward compatibility.

#2693
  • Loading branch information
buger authored Jan 21, 2020
1 parent 43b37bf commit 3fd2820
Show file tree
Hide file tree
Showing 19 changed files with 502 additions and 415 deletions.
13 changes: 6 additions & 7 deletions coprocess/bindings/python/coprocess_common_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

95 changes: 47 additions & 48 deletions coprocess/bindings/python/coprocess_mini_request_object_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 21 additions & 20 deletions coprocess/bindings/python/coprocess_object_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3fd2820

Please sign in to comment.