Skip to content

impr: Little code improvements#908

Merged
samcamwilliams merged 2 commits into
edgefrom
impr/little
May 15, 2026
Merged

impr: Little code improvements#908
samcamwilliams merged 2 commits into
edgefrom
impr/little

Conversation

@speeddragon
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread src/hb_http_client.erl Outdated
get_status_class({error, {stream_error, {closed, normal}}}) ->
<<"stream-closed">>;
get_status_class({error, Error}) when is_atom(Error) ->
atom_to_binary(Error);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we do the atom_with_underscores to dashed-binary version instead? We have a util function for this I think, and if we don't we should make one.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

dev_snp:canonical_hash_key/1 does it, but probably we should create something in hb_util.

Comment thread src/hb_http_server.erl Outdated
{returning_500_error,
{method, cowboy_req:method(Req)},
{path, cowboy_req:path(Req)},
{path, {explicit, cowboy_req:path(Req)}},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do you mean {string, ...} instead if you just want to print the chars? explicit is pretty ugly

@samcamwilliams samcamwilliams merged commit 59a3baa into edge May 15, 2026
@samcamwilliams samcamwilliams deleted the impr/little branch May 15, 2026 17:35
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.

2 participants