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

Feature: RPC HTTP Adapter #3630

Merged
merged 15 commits into from
Mar 10, 2023
Merged

Feature: RPC HTTP Adapter #3630

merged 15 commits into from
Mar 10, 2023

Conversation

EvanJRichard
Copy link
Contributor

Summary

This PR proposes to add HttpAdapter to ironfish/src/rpc/adapters. It is gated by enableRpcHttp, which defaults to false.

To simplify things, everything will be a POST request.

Testing Plan

WIP, unit tests + manual testing

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.

[ ] Yes

const error = ErrorUtils.renderError(e)
this.logger.debug(`Error in HTTP adapter: ${error}`)
res.writeHead(500)
res.end(JSON.stringify({ error }))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a non RPC uniform error. We should return a uniform RPC error so they don't have to handle this specially or consumers will not be happy.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea good suggestion. modified to handle more of our error types

@danield9tqh danield9tqh changed the title [WIP] Feature: RPC HTTP Adapter Feature: RPC HTTP Adapter Mar 9, 2023
@danield9tqh danield9tqh marked this pull request as ready for review March 9, 2023 22:47
@danield9tqh danield9tqh requested a review from a team as a code owner March 9, 2023 22:47
@EvanJRichard EvanJRichard merged commit 56d9dfd into staging Mar 10, 2023
@EvanJRichard EvanJRichard deleted the feat-rpc-http branch March 10, 2023 16:46
@danield9tqh danield9tqh restored the feat-rpc-http branch March 24, 2023 16:47
@danield9tqh danield9tqh deleted the feat-rpc-http branch March 24, 2023 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants