refactor(ensapi): apply operation result pattern#1547
refactor(ensapi): apply operation result pattern#1547Copilot wants to merge 1 commit intoensnode-result-type/registrar-actions-apifrom
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Lite PR
Summary
resultIntoHttpResponsefunction, that produces a HTTPResponseobject based on the provided operation result.onError,notFound)GET /amirealtimeendpointAmIRealtimeResultresult typeRegistrarActionsResultresult typeminIndexingCursor(as per MoveaccurateAsOffield into generic response data model / middleware #1512). We useAbstractResultOkTimestampedtype to achieve that.buildResultOkandbuildResultOkTimestampedbuildRouteResponsesDescriptionfunctionRESULT_CODE_SERVER_ERROR_CODESwithResultCodes.ServiceUnavailablebuildResultServiceUnavailablebuilder function andResultServertype.Why
minIndexingCursorfield in their response data model to indicate to which point in time the response data is guaranteed to be up to.Testing
/amirealtimeand/api/registrar-actionsendpoints locally, simulating conditions where both, ok and error results were returned from ENSApi.Notes for Reviewer (Optional)
Pre-Review Checklist (Blocking)
Resulttype #1539 before PR 1539 is ready for review.Resulttype #1539 .💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.