remotion-lambda 4.0.258__tar.gz → 4.0.260__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/PKG-INFO +1 -1
  2. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/remotion_lambda/remotionclient.py +19 -5
  3. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/remotion_lambda/version.py +1 -1
  4. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/remotion_lambda.egg-info/PKG-INFO +1 -1
  5. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/LICENSE +0 -0
  6. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/README.md +0 -0
  7. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/remotion_lambda/__init__.py +0 -0
  8. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/remotion_lambda/models.py +0 -0
  9. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/remotion_lambda.egg-info/SOURCES.txt +0 -0
  10. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/remotion_lambda.egg-info/dependency_links.txt +0 -0
  11. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/remotion_lambda.egg-info/requires.txt +0 -0
  12. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/remotion_lambda.egg-info/top_level.txt +0 -0
  13. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/setup.cfg +0 -0
  14. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/setup.py +0 -0
  15. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/tests/__init__.py +0 -0
  16. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/tests/test_get_render_progress_client.py +0 -0
  17. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/tests/test_render_client_render_media.py +0 -0
  18. {remotion_lambda-4.0.258 → remotion_lambda-4.0.260}/tests/test_render_client_render_still.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: remotion_lambda
3
- Version: 4.0.258
3
+ Version: 4.0.260
4
4
  Summary: Remotion Lambda client
5
5
  Home-page: https://github.com/remotion-dev/remotion/tree/main/packages/lambda-python
6
6
  Author: Jonny Burger
@@ -103,16 +103,30 @@ class RemotionClient:
103
103
  def _invoke_lambda(self, function_name, payload):
104
104
 
105
105
  client = self._create_lambda_client()
106
- response = client.invoke(
107
- FunctionName=function_name, Payload=payload, )
108
- result = response['Payload'].read().decode('utf-8')
109
- decoded_result = self._parse_stream(result)[-1]
106
+ try:
107
+ response = client.invoke(
108
+ FunctionName=function_name, Payload=payload)
109
+ result = response['Payload'].read().decode('utf-8')
110
+ decoded_result = self._parse_stream(result)[-1]
111
+ except client.exceptions.ResourceNotFoundException as e:
112
+ raise ValueError(
113
+ f"The function {function_name} does not exist.") from e
114
+ except client.exceptions.InvalidRequestContentException as e:
115
+ raise ValueError("The request content is invalid.") from e
116
+ except client.exceptions.RequestTooLargeException as e:
117
+ raise ValueError("The request payload is too large.") from e
118
+ except client.exceptions.ServiceException as e:
119
+ raise ValueError(
120
+ f"An internal service error occurred: {str(e)}") from e
121
+ except Exception as e:
122
+ raise ValueError(f"An unexpected error occurred: {str(e)}") from e
123
+
110
124
  if 'errorMessage' in decoded_result:
111
125
  raise ValueError(decoded_result['errorMessage'])
112
126
 
113
127
  if 'type' in decoded_result and decoded_result['type'] == 'error':
114
128
  raise ValueError(decoded_result['message'])
115
- if (not 'type' in decoded_result or decoded_result['type'] != 'success'):
129
+ if 'type' not in decoded_result or decoded_result['type'] != 'success':
116
130
  raise ValueError(result)
117
131
 
118
132
  return decoded_result
@@ -1,2 +1,2 @@
1
1
  # pylint: disable=missing-module-docstring, missing-final-newline
2
- VERSION = "4.0.258"
2
+ VERSION = "4.0.260"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: remotion-lambda
3
- Version: 4.0.258
3
+ Version: 4.0.260
4
4
  Summary: Remotion Lambda client
5
5
  Home-page: https://github.com/remotion-dev/remotion/tree/main/packages/lambda-python
6
6
  Author: Jonny Burger