summaryrefslogtreecommitdiffstats
path: root/internal/client/skiptrace.go
diff options
context:
space:
mode:
authors <[email protected]>2025-11-10 15:22:32 -0500
committers <[email protected]>2025-11-10 15:22:32 -0500
commit8383a241fc3cf5b022c9c53f8f19690edf04177b (patch)
tree887a489f7931d07373530c7e053f0343dca65e1d /internal/client/skiptrace.go
parent9a9e79f232b83d3bd2a816287272515863df1299 (diff)
downloaddborg-8383a241fc3cf5b022c9c53f8f19690edf04177b.tar.gz
dborg-8383a241fc3cf5b022c9c53f8f19690edf04177b.zip
refactor: restructure client modules and add config file supportv0.8.1
- Split large osint.go client into focused modules (bssid.go, breachforum.go, buckets.go, etc.) - Add config file support with init command for API key management - Remove api-key flag in favor of config file + env var fallback - Update API paths to remove /osint prefix - Add crawl endpoint streaming support - Improve error handling with 402 payment required status
Diffstat (limited to 'internal/client/skiptrace.go')
-rw-r--r--internal/client/skiptrace.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/client/skiptrace.go b/internal/client/skiptrace.go
index 6b84336..d4e26ea 100644
--- a/internal/client/skiptrace.go
+++ b/internal/client/skiptrace.go
@@ -75,6 +75,8 @@ func (c *Client) getSSE(path string, params url.Values) ([]byte, error) {
if resp.StatusCode != http.StatusOK {
bodyBytes, _ := io.ReadAll(resp.Body)
switch resp.StatusCode {
+ case http.StatusPaymentRequired:
+ return nil, fmt.Errorf("insufficient credits (402): %s - Please add credits to your account", string(bodyBytes))
case http.StatusForbidden:
return nil, fmt.Errorf("access denied (403): %s - This endpoint requires premium access", string(bodyBytes))
case http.StatusUnauthorized: