Import single packet 1) Validate packet 2) Send 3) Return Question How are we deciding to return 400 bad request vs creating input with status regarding request? * Is the assumption that if we can determine an error we should do as soon
(project_string_id)
| 27 | @Project_permissions.user_has_project(['admin', "Editor"]) |
| 28 | @limiter.limit("20 per second") |
| 29 | def input_packet(project_string_id): |
| 30 | """ |
| 31 | Import single packet |
| 32 | |
| 33 | 1) Validate packet |
| 34 | 2) Send |
| 35 | 3) Return |
| 36 | |
| 37 | Question |
| 38 | How are we deciding to return 400 bad request |
| 39 | vs creating input with status regarding request? |
| 40 | * Is the assumption that if we can determine an error |
| 41 | we should do as soon as possible without creating it? |
| 42 | * Or that if it's directly related to the spec list |
| 43 | that's the criteria? |
| 44 | """ |
| 45 | |
| 46 | spec_list = [{'job_id': None}, |
| 47 | {'file_id': None}, |
| 48 | {'file_name': None}, |
| 49 | {'mode': None}, |
| 50 | {'directory_id': None}, |
| 51 | {'original_filename': None}, |
| 52 | {'raw_data_blob_path': None}, |
| 53 | {'instance_list': { |
| 54 | "required": False, |
| 55 | "kind": list, |
| 56 | |
| 57 | }}, |
| 58 | {'text_data': None}, |
| 59 | {'parent_file_id': { |
| 60 | "required": False, |
| 61 | "kind": int |
| 62 | }}, |
| 63 | {'ordinal': { |
| 64 | "required": False, |
| 65 | "kind": int |
| 66 | }}, |
| 67 | {'connection_id': { |
| 68 | "required": False, |
| 69 | "kind": int |
| 70 | }}, |
| 71 | {'bucket_name': { |
| 72 | "required": False, |
| 73 | "kind": str |
| 74 | }}, |
| 75 | {'blob_path': { |
| 76 | "required": False, |
| 77 | "kind": str |
| 78 | }}, |
| 79 | {'type': None}, |
| 80 | {'batch_id': None}, |
| 81 | {"media": { |
| 82 | 'default': {}, |
| 83 | 'kind': dict, |
| 84 | } |
| 85 | }, |
| 86 | {"video_split_duration": { |
nothing calls this directly
no test coverage detected