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

Consume REST params and consistently handle error messages #295

Merged

Conversation

dbwiddis
Copy link
Member

Description

  1. Always consumes the workflow_id param before any other error handling, so it doesn't get swallowed by BaseRestHandler consumed-param checks
  2. Just returns a null response to the channel when there is no content, as the BaseRestHandler has an error for that
  3. Keeps the FlowFrameworkException RestStatus in the response if that's what's thrown

Issues Resolved

Fixes #274
Fixes #292
Fixes #293

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
@dbwiddis dbwiddis merged commit 1065208 into opensearch-project:feature/agent_framework Dec 15, 2023
10 checks passed
@dbwiddis dbwiddis deleted the consume-rest branch December 15, 2023 17:49
dbwiddis added a commit to dbwiddis/flow-framework that referenced this pull request Dec 15, 2023
…h-project#295)

* Always consume the workflow_id param

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Delegate no-content error message to BaseRestHandler

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Don't lose FlowFrameworkException status

Signed-off-by: Daniel Widdis <widdis@gmail.com>

---------

Signed-off-by: Daniel Widdis <widdis@gmail.com>
dbwiddis added a commit to dbwiddis/flow-framework that referenced this pull request Dec 15, 2023
…h-project#295)

* Always consume the workflow_id param

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Delegate no-content error message to BaseRestHandler

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Don't lose FlowFrameworkException status

Signed-off-by: Daniel Widdis <widdis@gmail.com>

---------

Signed-off-by: Daniel Widdis <widdis@gmail.com>
dbwiddis added a commit to dbwiddis/flow-framework that referenced this pull request Dec 15, 2023
…h-project#295)

* Always consume the workflow_id param

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Delegate no-content error message to BaseRestHandler

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Don't lose FlowFrameworkException status

Signed-off-by: Daniel Widdis <widdis@gmail.com>

---------

Signed-off-by: Daniel Widdis <widdis@gmail.com>
dbwiddis added a commit to dbwiddis/flow-framework that referenced this pull request Dec 15, 2023
…h-project#295)

* Always consume the workflow_id param

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Delegate no-content error message to BaseRestHandler

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Don't lose FlowFrameworkException status

Signed-off-by: Daniel Widdis <widdis@gmail.com>

---------

Signed-off-by: Daniel Widdis <widdis@gmail.com>
dbwiddis added a commit that referenced this pull request Dec 18, 2023
* Always consume the workflow_id param

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Delegate no-content error message to BaseRestHandler

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Don't lose FlowFrameworkException status

Signed-off-by: Daniel Widdis <widdis@gmail.com>

---------

Signed-off-by: Daniel Widdis <widdis@gmail.com>
dbwiddis added a commit to dbwiddis/flow-framework that referenced this pull request Dec 18, 2023
…h-project#295)

* Always consume the workflow_id param

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Delegate no-content error message to BaseRestHandler

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Don't lose FlowFrameworkException status

Signed-off-by: Daniel Widdis <widdis@gmail.com>

---------

Signed-off-by: Daniel Widdis <widdis@gmail.com>
dbwiddis added a commit that referenced this pull request Dec 18, 2023
* Always consume the workflow_id param

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Delegate no-content error message to BaseRestHandler

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Don't lose FlowFrameworkException status

Signed-off-by: Daniel Widdis <widdis@gmail.com>

---------

Signed-off-by: Daniel Widdis <widdis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants