Repository navigation
Conversation
When a layer export takes longer than the API's wait, get_export_link gets a 202 with a poll_endpoint instead of an export_link and raised KeyError. It now polls the export until it completes, fails or times out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ARj2mn5it8WunGFqtgbfjv
felt.com now 301-redirects /api/v2/projects/ to /api/v2/projects, and urllib follows a 301 on POST as a bodiless GET, so create_project returned the project list and delete_project raised. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
get_export_link(anddownload_layer, which calls it) raisedKeyError: 'export_link'on any layer export slower than the API's 55 s wait. The API then answers202 {status: "processing", message, poll_endpoint}instead of200 {export_link}, and the export keeps running server-side with no way for the caller to collect it.Changes
get_export_linkpollspoll_endpoint(the custom export status route), backing off from 2 s to 15 s between polls, and returnsdownload_urlonce the export iscompleted.ExportFailedErrorwhen the export fails, andExportTimeoutErroraftertimeoutseconds (default 600). Both carrypoll_endpoint; a timed-out export keeps running and can still be collected from it.get_export_linkanddownload_layertake an optionaltimeout. Existing calls are unchanged.Testing
tests/export_link_test.py(no API token needed): an immediate link, a 202 →pending→in_progress→completedsequence, a failed export, and the timeout. Revertingget_export_linkto the old one-shot read fails 3 of the 4.ruff check,ruff format --diffandmypy .pass.tests/tests.pyneedsFELT_API_TOKENand runs in CI; I didn't run it locally.🤖 Generated with Claude Code
https://claude.ai/code/session_01ARj2mn5it8WunGFqtgbfjv