Conversation
- Add ApiDelegate alias re-exporting DelegateFieldsFragment, mirroring the existing ApiProposal/ApiVote pattern in graphqlApi/types.ts - Use ApiDelegate to type the loadDelegates map callback (drops a stray `any` from the response shape) - Convert silent-catch console.log calls in formatExecution and formatSimulation to console.error so parse failures surface as errors - Remove leftover debug console.log in the proposal-create onSuccess callback
|
@epikalmit is attempting to deploy a commit to the Lightchain AI Team on Vercel. A member of the Team first needs to authorize it. |
Without the error object, the call carried error severity but no diagnostic value. Bind the caught value so failures are actionable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ApiDelegatealias re-exportingDelegateFieldsFragmentingraphqlApi/types.ts, matching the existingApiProposal/ApiVotepattern.ApiDelegateto type theloadDelegatesmap callback ingraphqlApi/index.ts, removing a strayanyfrom the response shape.formatExecutionandformatSimulationparse fallbacks, bind the caught error and forward it toconsole.errorso failures are actually diagnosable (wasconsole.logwith no error context).console.log("Proposal created with ID:", …)from theonSuccesscallback inapp/proposal/create/page.tsx.Note: the parse-fallback log calls move from
console.logtoconsole.error. The catch path is still a documented graceful fallback (returns[]), but parse failures on indexer payloads are unexpected and should surface — flagging in case any external log filter treatserrordifferently.Test plan (for reviewer)
npm run lintpassesnpm run build/ Vercel preview succeeds/on successI was unable to run lint locally — the repo
.npmrcrequires aNPM_FONTAWESOME_TOKENI don't have. Happy to iterate if CI/Vercel preview catches anything.