Skip to content

Conversation

@hiett
Copy link
Owner

@hiett hiett commented Jul 29, 2023

Requires a bit more code to ensure the pool gets properly destroyed, but now an error 500 is returned with the message "Unable to connect to the Redis server" when it is unable to establish a connection

@hiett hiett linked an issue Jul 29, 2023 that may be closed by this pull request
@hiett hiett marked this pull request as ready for review August 2, 2023 02:18
@hiett hiett merged commit 2dbe17d into master Aug 3, 2023
@hiett hiett deleted the 12-connection-refused-does-not-return-an-error branch August 3, 2023 01:11
{:redis_error, data} ->
%{code: 400, message: Jason.encode!(data), json: true}

{:not_authorized, message} ->
Copy link
Contributor

@jahands jahands Aug 3, 2023

Choose a reason for hiding this comment

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

Would it make sense to encode other errors the same way? (Maybe in a separate PR?)
Edit: oops, was 2 minutes too late :)

Copy link
Owner Author

Choose a reason for hiding this comment

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

Haha, yes, I can do another PR for error overhaul and clean this all up

@hiett hiett mentioned this pull request Aug 3, 2023
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.

Connection refused does not return an error

3 participants