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

chore: keep the handler error instead of trying to hijack it as it breaks the user experience. #85

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

jcchavezs
Copy link
Member

@jcchavezs jcchavezs commented Jul 8, 2023

Currently when a later in the chain middleware returned an error with a certain status code, we attempted to wrap that error with an own error which lead to misleading behaviours

Closes #83.

Ping @rasschaert

…eaks the user experience.

Currently when a later in the chain middleware returned an error with a certain status code, we attempted to wrap that error with an own error which lead to misleading behaviours e.g. #83.
@sonarcloud
Copy link

sonarcloud bot commented Jul 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@jptosso
Copy link
Member

jptosso commented Jul 10, 2023

It is working: https://tosso.io/experiment/basicauth username: foouser, password: foopassword

image

My settings:

    handle /experiment/basicauth {
        basicauth * {
            # not the actual credentials, just an example for github
            foouser $2a$14$EUkRdDpsoURnFJtZz3KhLuIIAirpmYdMYyetZI0uDR08ok3ZWp3I.
        }
        respond "It worked :)"
    } 

@jcchavezs jcchavezs merged commit 5626d6c into main Jul 10, 2023
@jcchavezs jcchavezs deleted the fixes_auth branch July 10, 2023 07:41
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.

500 instead of 401 on unauthenticated requests
2 participants