Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle errors from exif-api #81

Open
nathanielrindlaub opened this issue Apr 28, 2024 · 0 comments
Open

Handle errors from exif-api #81

nathanielrindlaub opened this issue Apr 28, 2024 · 0 comments

Comments

@nathanielrindlaub
Copy link
Member

exif-api sometimes returns errors, which we currently do not handle. Instead, error messages get treated like they're exif data and added to the metadata payload we submit to createImage():

            "md": {
                "Bucket": "animl-images-ingestion-prod",
                "Key": "batch-fc20b725-e65d-4f30-b61e-d050a27cb2a1/SH2_2/113EK113/03300262.JPG",
                "errors": [],
                "FileName": "03300262.jpg",
                "batchId": "batch-fc20b725-e65d-4f30-b61e-d050a27cb2a1",
                "message": "S3 object does not exist, is empty, or access denied",  // this is the error message from exif-api
                "FileTypeExtension": ".jpg",
                "Make": "unknown",
                "MIMEType": "image/jpeg",
                "SerialNumber": "unknown",
                "ProdBucket": "animl-images-serving-prod",
                "Hash": "b040d0103782d6d7c59054d557c5d19b",
                "ImageBytes": 904827,
                "Path": "SH2_2/113EK113/03300262.JPG"
            }

Ideally, we would still create an imageAttempt record and then an imageError on the animl-api side so that users have some indication that there was an error with that image. I think this should be possible by passing the error into the errors array of the metadata we post to createImage(). See this line in animl-api to see how that would get handled on the API side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant