Skip to content

v0.4.22

Latest

Choose a tag to compare

@openhra openhra released this 26 Nov 05:46
  • Every REST route family now answers a failure with one body, { "error": { "code", "field"?, "hint"? } }, built by one helper (src/api/errors.ts). This covers the native routes, /v1/data-availability, the readiness probe, the unknown-route and internal-error answers, the compatibility routes under /compat/v1, and the error pages the nginx edge answers with (bad_request, forbidden, method_not_allowed, request_timeout, request_too_large, uri_too_long, unsupported_media_type, request_header_fields_too_large, internal_error, unauthorized, not_found, rate_limited). docs/public-contract.json pins the shape: hint is a new optional string, and codes are lower snake case.

  • The compatibility routes now carry hint where they carried message; the sentence is unchanged.

  • The MCP endpoint's HTTP 429 keeps its JSON-RPC envelope and adds error.data with the same code and hint.

  • Every unknown now says why. Availability rows add <name>_reason beside each <name>_status that is unknown and had no reason. Plan views add reason to an unknown cost_sharing, catalog_metadata, network and issuer, add benefits_reason beside an unknown benefits_status, and add reason to an unknown ZIP lookup, plan search and carrier or network listing. docs/public-contract.json lists the reason vocabulary under reasons.

  • Breaking: the message field of an error body is now hint, and error codes and reason codes that were upper case are now lower case, so a client that reads message or matches on a code must change. Renamed codes: AGE_OR_DOB_REQUIRED, AUTH_NOT_CONFIGURED, AUTH_REQUIRED, BATCH_READ_FAILED, BATCH_RESPONSE_TOO_LARGE, CATALOG_CHANGED_RETRY, CATALOG_NOT_LOADED, CHILD_ONLY_OR_MINOR_SUBSCRIBER_REQUIRES_EVIDENCE, CHILD_ONLY_POLICY_REQUIRES_SEPARATE_ADAPTER, CONFLICTING_FILED_TIER_ROWS, CONFLICTING_RXCUI, CONFLICTING_VARIANT, COUNTY_SCOPED_ZIP3_CROSS_COUNTY_PREFIXES_AMBIGUOUS, CURSOR_EXPIRED, DATA_CHANGED, DATA_UNAVAILABLE, DENTAL_AGE_DETERMINATION_UNPROVED, DENTAL_CHILD_ONLY_OFFERING_MISSING_OR_CONFLICTING, DENTAL_CHILD_RATING_LIMIT_UNPROVED, DENTAL_DEPENDENT_AGE_MEMBERSHIP_UNPROVED, DENTAL_HOUSEHOLD_OFFERING_UNSUPPORTED, DENTAL_RATE_MISSING, DENTAL_RELATIONSHIP_OR_COHABITATION_UNPROVED, DENTAL_STATE_SCOPE_MISMATCH, DEPENDENT_EXTENSION_REQUIRES_EVIDENCE, DOB_NOT_ACCEPTED, DOCUMENT_EVIDENCE_UNAVAILABLE, DRUG_NOT_FOUND, DRUG_RESULTS_REQUIRE_SEARCH_DRUGS_FOR_MORE, DUPLICATE_IDENTIFIER, DUPLICATE_MEASURE, DUPLICATE_NPI, DUPLICATE_PLAN_ID, DUPLICATE_RXCUI, EHB_FRACTION_MISSING_OR_CONFLICTING, ENTITY_NOT_FOUND, FAMILY_OPTION_MEMBERSHIP_NOT_DEFINED_FOR_HOUSEHOLD, FAMILY_OPTION_MINOR_SUBSCRIBER_MEMBERSHIP_UNPROVED, FAMILY_OPTION_TOBACCO_MEMBERSHIP_UNPROVED, FAMILY_TIER_PEDIATRIC_ALLOCATION_UNPROVED, FILED_RATING_METHOD_UNSUPPORTED, FILTER_REQUIRED, GENERATION_CHANGED, GEOGRAPHY_NOT_FOUND, GEOGRAPHY_SEARCH_REQUIRES_ZIP, INCOME_NOT_ACCEPTED, INTERNAL_ERROR, INTERNAL_HONESTY_CHECK, INVALID_BATCH, INVALID_CURSOR, INVALID_DATE, INVALID_FETCH_ID, INVALID_INPUT, INVALID_JSON, INVALID_NDC, INVALID_PLAN_KEY, INVALID_SCHEDULE, INVALID_YEAR, LOCATION_REQUIRED, MARKET_SEGMENT_REQUIRED, MARKETABILITY_UNKNOWN, MIXED_DENTAL_RATING_METHODS, msot_candidate_limit, msot_catalog_changed, msot_conflicting_filter, msot_context_changed, msot_context_mismatch, msot_filter_mismatch, msot_invalid_filter, msot_operation_unsupported, msot_plan_not_found, msot_provider_unavailable, msot_public_read_forbidden, msot_scope_identity_unknown, msot_selector_conflict, msot_serving_disabled, MULTIPLE_DENTAL_FAMILY_ROWS, NO_APPLICABLE_COMMUNITY_RULE, NO_APPLICABLE_DENTAL_RULE, NOT_FOUND, NOT_IMPLEMENTED, PLAN_NOT_FILED_IN_RATING_AREA, PLAN_NOT_FOUND, PLAN_NOT_MARKETABLE, PLAN_NOT_OFFERED_IN_LOCATION, PLAN_SEARCH_REQUIRES_YEAR_AND_LOCATION, PREMIUM_NOT_RATED, PROVIDER_NOT_FOUND, PROVIDER_RESULTS_REQUIRE_SEARCH_PROVIDERS_FOR_MORE, PROVIDER_SEARCH_REQUIRES_LITERAL_NAME_OR_NPI, PUBLIC_QUOTE_TIER, QUERY_OR_NDC_REQUIRED, QUOTING_DISABLED, RATE_LIMITED, REQUEST_DEADLINE, REQUEST_TOO_LARGE, RESULT_TOO_LARGE, SAFE_HARBOR_INPUT_MISSING, SEARCH_TOO_BROAD, SNAPSHOT_NOT_FOUND, SOURCE_ACCESS_DENIED, SOURCE_INCOMPLETE, SOURCE_METADATA_UNAVAILABLE, STATE_OR_FILED_RATING_METHOD_UNSUPPORTED, STATE_RATING_METHOD_UNSUPPORTED, TAXONOMY_OR_SPECIALTY_REQUIRED, TOO_MANY_DRUGS, TOO_MANY_MEMBERS, TOO_MANY_PAIRS, TOO_MANY_PLANS, TOO_MANY_PROVIDERS, TPA_ACCESS_NOT_CONFIGURED, UNAUTHORIZED, UNKNOWN_FIELD, UNRESOLVED_LOCATION_SCOPE, UNRESOLVED_NETWORK_TIER, UNRESOLVED_RATING_AREA, UNSUPPORTED_FIELD, UNSUPPORTED_HOUSEHOLD_RELATIONSHIPS, UNSUPPORTED_MARKET, UNSUPPORTED_NPI_FILTER_COMBINATION, UNSUPPORTED_SECTION, W2_MONTHS_INCOMPLETE, W2_MONTHS_OFFERED_EXCEED_EMPLOYED, YEAR_REQUIRED, ZIP_COUNTY_MISMATCH, ZIP_OR_COUNTY_REQUIRED.

  • /readyz, /healthz and the status page answer as fast as v0.4.21 again. /readyz and /healthz run one database query that proves the database answers and reads the data generation, and recompute release, generation, pricing, plan_years and schema only when the generation, the calendar year or the applied migration count changes. The status page no longer builds the per-row reason members its own view drops. The answers keep the same members and values.

  • Every API and MCP HTTP response now carries an x-request-id header. A client-sent id of 1 to 128 visible ASCII characters comes back unchanged; anything else is replaced with a generated 16 hex digit id. Every REST error body adds error.request_id with the same value, and the internal error log line and the MCP request log line carry it as request_id. Quote it when reporting a problem; the API guide says how. docs/public-contract.json pins the header and the member.

  • GET /readyz adds release, generation, pricing, plan_years and schema when the API is ready, and /healthz carries the same members when it is healthy and no migration is pending. The self-host guide answers "which version am I running" with this route. A 503 answer carries none of them. The MCP tool get_data_status adds release. docs/public-contract.json pins the members.

  • New worker doctor checks a self-hosted install. It reports whether the database answers, whether migrations are pending or the image is older than the database, whether plan data is loaded, whether the data directory exists and is writable, how much disk is free and whether the raw cache is empty. Each failing line says what to run next, and the command exits 1 on the first failure. It prints whether a setting is present, never its value. The self-host guide has a "Check an install" section.

  • worker --help (also -h and help) now exits 0, and the usage line lists every command, including bootstrap, ingest sbe, ingest state, ingest rating-rules and ingest puf acquire.

  • compose.yml now passes CMS_API_KEY, the OPENPLANS_GEOCODER_* settings and OPENPLANS_OPEN_GEOCODER_URL from .env to the worker and scheduler. Before, setting them in .env had no effect on those services. Empty values stay off.

  • GET /healthz answers status: "down" instead of "ok" when the database is down. The db member and the 503 status are unchanged.