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

apidir fallback resolution; bluepages tweaks; hepa apidir support #986

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

bnewbold
Copy link
Collaborator

No description provided.

@bnewbold bnewbold requested a review from brianolson March 12, 2025 23:07
@@ -136,6 +141,14 @@ func (dir *APIDirectory) ResolveDIDRaw(ctx context.Context, did syntax.DID) (jso
if err != nil {
didResolution.WithLabelValues("apidir", "error").Inc()
didResolutionDuration.WithLabelValues("apidir", "error").Observe(time.Since(start).Seconds())
if dir.Fallback != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

this and ResolveHandle should check what kind of error like Lookup* ?
maybe make a helper for 'is api service error' ?

ctx := c.Request().Context()

hdl, err := syntax.ParseHandle(c.QueryParam("handle"))
ctx, cancel := context.WithTimeout(context.Background(), srv.requestTimeout)
Copy link
Contributor

Choose a reason for hiding this comment

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

this timeout around the whole action of the API handler is probably fine, but it makes me think that the timeout I'd really want is on the underlying client making outbound requests

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.

2 participants