validateAndGetKnowledgeBase (knowledgebase.go) and the four sibling helpers in faq.go / knowledge.go / tag.go / initialization.go used to wrap every Get*ByID error — including the well-known repository.ErrKnowledgeBaseNotFound sentinel — as a 500. That turned every probe of a stale or cross-tenant K
| 36 | // other method nil-panicky on purpose so a future test that reaches |
| 37 | // outside the contract fails loudly. |
| 38 | type stubKBOnlyService struct { |
| 39 | interfaces.KnowledgeBaseService |
| 40 | getByID func(ctx context.Context, id string) (*types.KnowledgeBase, error) |
| 41 | fillKnowledgeBaseCounts func(ctx context.Context, kb *types.KnowledgeBase) error |
| 42 | } |
| 43 | |
| 44 | func (s *stubKBOnlyService) GetKnowledgeBaseByID(ctx context.Context, id string) (*types.KnowledgeBase, error) { |
| 45 | return s.getByID(ctx, id) |
nothing calls this directly
no outgoing calls
no test coverage detected