Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

infer.sh: Fix error detection on detect.roboflow.com API endpoint #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jkitching
Copy link

The detect.roboflow.com API endpoint appears to return one of:

  • Invalid API key {"message":"Forbidden"}

  • Invalid model ID {"detail":"Not Found"}

  • Other invalid parameters (e.g. no POST data given) {"detail":"Method Not Allowed"}

Perhaps in the past, it returned "not authorized" and "does not exist", but not anymore.

Without this patch, running infer.sh carries along merrily until it attempts to put together an output video, and shows a bunch of errors like this one, due to the input files just containing one of the JSON errors listed above:

[mjpeg @ 0x55c365593fc0] No JPEG data found in image
Error while decoding stream #0:0: Invalid data found when processing input

It might be worth setting up some e2e tests that directly hit the API endpoint (or an internal test instance) to prevent this from happening again.

The detect.roboflow.com API endpoint appears to return one of:

- Invalid API key
  {"message":"Forbidden"}

- Invalid model ID
  {"detail":"Not Found"}

- Other invalid parameters (e.g. no POST data given)
  {"detail":"Method Not Allowed"}

Perhaps in the past, it returned "not authorized" and "does not exist",
but not anymore.

Without this patch, running infer.sh carries along merrily until it
attempts to put together an output video, and shows a bunch of errors
like this one, due to the input files just containing one of the JSON
errors listed above:

  [mjpeg @ 0x55c365593fc0] No JPEG data found in image
  Error while decoding stream #0:0: Invalid data found when processing input

It might be worth setting up some e2e tests that directly hit the API
endpoint (or an internal test instance) to prevent this from happening
again.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant