Exception: SecApi::NotFoundError

Inherits:
PermanentError show all
Defined in:
lib/sec_api/errors/not_found_error.rb

Overview

Raised when a requested resource is not found (404 Not Found).

Why PermanentError? The resource genuinely doesn’t exist - invalid ticker, nonexistent CIK, or filing not in database. Retrying won’t create it. User needs to fix their query parameters or check that the resource exists.

This is a permanent error - the requested ticker, CIK, or filing does not exist. Retrying won’t help; the query parameters need to be corrected.

Examples:

Handling not found errors

begin
  client.query.ticker("INVALID").search
rescue SecApi::NotFoundError => e
  # Correct the ticker symbol or filing identifier
  logger.warn("Resource not found: #{e.message}")
  prompt_user_for_valid_ticker
end

Instance Attribute Summary

Attributes inherited from Error

#request_id

Method Summary

Methods inherited from Error

#initialize

Constructor Details

This class inherits a constructor from SecApi::Error