Skip to content

Commit

Permalink
filter the case when sentry endpoint is empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
amoylan2 committed Aug 22, 2024
1 parent dd003ad commit 5495a73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion coordinator/internal/types/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
type LoginSchema struct {
Time time.Time `json:"time"`
Token string `json:"token"`
SentryEndpoint string `json:"sentry_endpoint"`
SentryEndpoint string `json:"sentry_endpoint,omitempty"`
}

// TODO just use for darwin upgrade, need delete next upgrade
Expand Down
2 changes: 1 addition & 1 deletion prover/src/coordinator_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl<'a> CoordinatorClient<'a> {
}
if let Some(r) = login_response.data {
token = r.token;
let _ = self.sentry_endpoint.set(r.sentry_endpoint);
let _ = self.sentry_endpoint.set(r.sentry_endpoint.filter(|s| !s.is_empty()));
} else {
bail!("login failed: got empty token")
}
Expand Down

0 comments on commit 5495a73

Please sign in to comment.