(t *testing.T)
| 709 | } |
| 710 | |
| 711 | func TestBuildAPIError_LogIDTopLevel(t *testing.T) { |
| 712 | resp := map[string]any{ |
| 713 | "code": 99991679, |
| 714 | "msg": "missing scope", |
| 715 | "log_id": "lg-top-456", |
| 716 | } |
| 717 | err := errclass.BuildAPIError(resp, errclass.ClassifyContext{Identity: "user"}) |
| 718 | p, ok := errs.ProblemOf(err) |
| 719 | if !ok { |
| 720 | t.Fatalf("ProblemOf returned !ok, err = %T", err) |
| 721 | } |
| 722 | if p.LogID != "lg-top-456" { |
| 723 | t.Errorf("LogID = %q, want lg-top-456", p.LogID) |
| 724 | } |
| 725 | } |
| 726 | |
| 727 | func TestBuildPermissionHint_MissingScopeRoutesToAuthLogin(t *testing.T) { |
| 728 | // missing_scope means the user authorized the app but did not grant |
nothing calls this directly
no test coverage detected