mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-11-07 09:45:36 +00:00
fix(quote): report listed-but-unpriced stocks as NOMARKETDATA
MSN returns suspended names (21 of 896 on 2026-10-02, e.g. WIKA, SUPR) with symbol, name and market cap but no price. These were reported as SYMBOLNOTFOUND, which tells an agent the ticker does not exist. Add a NoMarketData error for this case; unknown tickers stay SYMBOLNOTFOUND. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ld3fDSDiBzAaQvgZJX5NKM
This commit is contained in:
parent
f77f81c97b
commit
1785ac5c52
2 changed files with 31 additions and 6 deletions
|
|
@ -32,6 +32,8 @@ pub enum IdxError {
|
|||
PdfParseError(String),
|
||||
#[error("invalid input: {0}")]
|
||||
InvalidInput(String),
|
||||
#[error("no market data: {0}")]
|
||||
NoMarketData(String),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Serialize, PartialEq, Eq)]
|
||||
|
|
@ -50,6 +52,7 @@ pub enum ErrorCode {
|
|||
DatabaseError,
|
||||
PdfParseError,
|
||||
InvalidInput,
|
||||
NoMarketData,
|
||||
}
|
||||
|
||||
impl IdxError {
|
||||
|
|
@ -69,6 +72,7 @@ impl IdxError {
|
|||
Self::DatabaseError(_) => ErrorCode::DatabaseError,
|
||||
Self::PdfParseError(_) => ErrorCode::PdfParseError,
|
||||
Self::InvalidInput(_) => ErrorCode::InvalidInput,
|
||||
Self::NoMarketData(_) => ErrorCode::NoMarketData,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue