16 lines
1.0 KiB
Bash
16 lines
1.0 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
classify_live_failure() {
|
|
local live_tail="${1:-}"
|
|
if [[ "$live_tail" == *"signature_guard"* || "$live_tail" == *"unexpected status 403"* || "$live_tail" == *"unexpected status 502"* || "$live_tail" == *"unexpected status 503"* || "$live_tail" == *"unexpected status 504"* || "$live_tail" == *"no pricing cards found"* || "$live_tail" == *"no model rows parsed"* || "$live_tail" == *"no model overview cards parsed"* ]]; then
|
|
printf '%s\n' 'external_provider_failure'
|
|
else
|
|
printf '%s\n' 'primary_pipeline_failure'
|
|
fi
|
|
}
|
|
|
|
[[ "$(classify_live_failure 'perplexity_pricing_signature_guard: fetch https://docs.perplexity.ai/docs/agent-api/models.md: context deadline exceeded')" == 'external_provider_failure' ]]
|
|
[[ "$(classify_live_failure 'import_xfyun_pricing: unexpected xfyun pricing content: no pricing cards found')" == 'external_provider_failure' ]]
|
|
[[ "$(classify_live_failure 'insert report_runs failed: duplicate key value violates unique constraint')" == 'primary_pipeline_failure' ]]
|