labelbox-python icon indicating copy to clipboard operation
labelbox-python copied to clipboard

[PLT-0] Do not retry 422 errors

Open vbrodsky opened this issue 1 year ago • 0 comments

QA discovered this issue when trying to create a model config with an invalid model id. In this case, the model service return http 422 as follows:

[{'message': 'Validation Error', 'locations': [{'line': 2, 'column': 21}], 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'name': 'ApiError', 'url': 'http://lb-model-service-primary/api/v1/model-configs', 'status': 422, 'statusText': 'Unprocessable Entity', 'body': {'message': '1 validation error for Request body -> modelId value is not a valid uuid (type=type_error.uuid)'}, 'request': {'method': 'POST', 'url': '/api/v1/model-configs', 'body': {'modelId': 'invalid_valid_model_id', 'inferenceParams': {'param': 'value'}, 'organizationId': 'cl4ywm5aw00ke077lh4mrgpw5', 'name': 'model_config'}, 'mediaType': 'application/json', 'errors': {'422': 'Validation Error'}}}}, 'path': ['createModelConfig']}]

This PR prevents unnecessary retries of http 422 errors.

See https://labelbox.atlassian.net/browse/PLT-773?focusedCommentId=201400 for more

vbrodsky avatar May 09 '24 21:05 vbrodsky

Done in another PR

vbrodsky avatar May 10 '24 18:05 vbrodsky