fix: raise an error when duration is non-zero for video assets#2399
Merged
nicomiguelino merged 3 commits intoScreenly:masterfrom Jul 11, 2025
Merged
fix: raise an error when duration is non-zero for video assets#2399nicomiguelino merged 3 commits intoScreenly:masterfrom
nicomiguelino merged 3 commits intoScreenly:masterfrom
Conversation
|
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.



Issues Fixed
Creating a video asset via
POST /api/v2/assetsfails and gives the following errors:{ “error”: “Invalid file path. Failed to add asset.” }As seen in this forum post, the user did two endpoint calls.
The first call (i.e.,
POST /api/v2/file_asset) was successful.The second call (
POST /api/v2/assets) failed.The root cause is the non-zero value given to the duration in the request body for
POST /api/v2/assets. Take note that a asset is being given a duration similar to the uploaded video's.Description
This pull request modifies the
POST /api/v2/assetsendpoint so that it will fail gracefully when a non-zero duration for a video asset is given to the request body.Checklist