Skip to content

Replace checkPaymentChannelBalance panic with error#11

Closed
bitwiseguy wants to merge 7 commits intonitro-integrationfrom
dont-panic
Closed

Replace checkPaymentChannelBalance panic with error#11
bitwiseguy wants to merge 7 commits intonitro-integrationfrom
dont-panic

Conversation

@bitwiseguy
Copy link

resolves #9

@bitwiseguy bitwiseguy linked an issue Jun 14, 2023 that may be closed by this pull request
@bitwiseguy bitwiseguy changed the base branch from main to nitro-integration June 14, 2023 19:07
Copy link

@geoknee geoknee left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines 208 to 213
writeError(w, r, http.StatusInternalServerError, err.Error())
return
}

if !hasPaid {
webError(w, fmt.Errorf("payment of %d required", expectedPaymentAmount.Uint64()), http.StatusPaymentRequired)
Copy link

Choose a reason for hiding this comment

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

What's the difference between writeError and webError?

Copy link
Author

Choose a reason for hiding this comment

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

It looks like webError sets some additional headers related to CORS. I am changing this webError to writeError to conform to the rest of the error handling within this method.

@geoknee geoknee force-pushed the nitro-integration branch from c735b03 to 559eaa9 Compare June 15, 2023 09:15
@geoknee
Copy link

geoknee commented Jun 15, 2023

@bitwiseguy the base branch was rebased, which is giving you the conflicts. Seeing as you are out and that's my fault, I'm happy to sort it out?

@geoknee
Copy link

geoknee commented Jun 15, 2023

@bitwiseguy the base branch was rebased, which is giving you the conflicts. Seeing as you are out and that's my fault, I'm happy to sort it out?

#13

@geoknee geoknee closed this Jun 15, 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.

Replace panic with error

3 participants