While your own readme uses halt/1 as the last function called in an error helper example, calling halt in the helpers will not properly stop the calling of both error helpers in the case of load_and_authorize_resource/2 because it's only checking for sent connections.
Having it check if the conn has been halted after handle_unauthorized/2 makes things behave in a more intuitively Pluggy way.
While your own readme uses
halt/1
as the last function called in an error helper example, callinghalt
in the helpers will not properly stop the calling of both error helpers in the case ofload_and_authorize_resource/2
because it's only checking for sent connections.Having it check if the conn has been halted after
handle_unauthorized/2
makes things behave in a more intuitively Pluggy way.