-
Notifications
You must be signed in to change notification settings - Fork 7
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
create bolt12 offer support #148
Conversation
JasonCWang
commented
Jan 8, 2025
•
edited
Loading
edited
8757977
to
07a6d5b
Compare
07a6d5b
to
07e2de8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you run the generator to generate the objects or you wrote it manually?
Oh I wrote it manually.. since I updated the graphql schema in sparkcore, I need to run introspection again? |
yeah, everything in the objects folder needs to be generated. |
Shut right, will update that. Thanks for the reminder! |
07e2de8
to
08134af
Compare
if err != nil { | ||
return nil, errors.New("error parsing offer") | ||
} | ||
json.Unmarshal(offerJson, &offer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error from json.Unmarshal
should be captured and handled. Consider updating to:
if err := json.Unmarshal(offerJson, &offer); err != nil {
return nil, err
}
This ensures that any deserialization errors are properly propagated to the caller.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
Will rebase after merging object PR: https://app.graphite.dev/github/pr/lightsparkdev/go-sdk/155/Updating-graphql-objects-in-go-sdk |