POST /records — create skill record with 409 conflict handling. Returns ``(response_data, status_code)``.
(self, payload: Dict[str, Any])
| 231 | return artifact_id, file_count |
| 232 | |
| 233 | def create_record(self, payload: Dict[str, Any]) -> tuple[Dict[str, Any], int]: |
| 234 | """POST /records — create skill record with 409 conflict handling. |
| 235 | |
| 236 | Returns ``(response_data, status_code)``. |
| 237 | """ |
| 238 | body = json.dumps(payload).encode("utf-8") |
| 239 | try: |
| 240 | status, resp_data = self._request( |
| 241 | "POST", |
| 242 | "/records", |
| 243 | body=body, |
| 244 | extra_headers={"Content-Type": "application/json"}, |
| 245 | ) |
| 246 | return json.loads(resp_data.decode("utf-8")), status |
| 247 | except CloudError as e: |
| 248 | if e.status_code == 409: |
| 249 | return self._handle_409(e.body, payload) |
| 250 | raise |
| 251 | |
| 252 | def _handle_409( |
| 253 | self, body_text: str, payload: Dict[str, Any], |
no test coverage detected