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: Document HTTP headers for RPC (JSON/CBOR) #1165

Open
2 tasks done
IngwiePhoenix opened this issue Feb 12, 2025 · 0 comments
Open
2 tasks done

Feature: Document HTTP headers for RPC (JSON/CBOR) #1165

IngwiePhoenix opened this issue Feb 12, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@IngwiePhoenix
Copy link

Is your feature request related to a problem?

I ran into this:

2025-02-12T07:01:49.011002Z  WARN surreal::net::rpc: A connection was made without a specified protocol.
2025-02-12T07:01:49.011015Z  WARN surreal::net::rpc: Automatic inference of the protocol format is deprecated in SurrealDB 2.0 and will be removed in SurrealDB 3.0.
2025-02-12T07:01:49.011016Z  WARN surreal::net::rpc: Please upgrade any client to ensure that the connection format is specified.
2025-02-12T07:01:49.104529Z  WARN surreal::net::rpc: A connection was made without a specified protocol.
2025-02-12T07:01:49.104543Z  WARN surreal::net::rpc: Automatic inference of the protocol format is deprecated in SurrealDB 2.0 and will be removed in SurrealDB 3.0.
2025-02-12T07:01:49.104545Z  WARN surreal::net::rpc: Please upgrade any client to ensure that the connection format is specified.

Which resolves here: https://github.com/surrealdb/surrealdb/blob/0ee8dc2c3ec8e883038d0ee00bbce6a6126fe655/src/net/rpc.rs#L63-L67
...and is set here: https://github.com/surrealdb/surrealdb/blob/0ee8dc2c3ec8e883038d0ee00bbce6a6126fe655/crates/sdk/src/api/engine/remote/ws/native.rs#L81
...and is defined here: https://github.com/surrealdb/surrealdb/blob/0ee8dc2c3ec8e883038d0ee00bbce6a6126fe655/crates/sdk/src/api/engine/remote/ws/mod.rs#L26

Describe the solution

I'd like a small section about what headers must be set to properly address SurrealDB via RPC - those are just the things that I came across during my driver development, but I expect things to eventually change. for that case, documentation on them would be neccessary.

Alternative methods

Make the warn!(...) output more verbose; actually let the user know that a header was missing. Right now, this message is a little...nebulous? It tells you that there is a problem, but not what the problem actually is.

Contact Details

ingwie@birb.it

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@IngwiePhoenix IngwiePhoenix added the enhancement New feature or request label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant