assertRevision((string) $input['projectId'], isset($input['revision']) ? (string) $input['revision'] : null); Http::json( [ 'success' => true, 'state' => $boardService->createTask( (string) $input['projectId'], trim((string) ($input['title'] ?? 'Untitled Task')), (string) ($input['column'] ?? 'backlog'), (string) ($input['body'] ?? '') ), ] ); } catch (HttpHalt $halt) { return; } catch (Throwable $exception) { Http::error($exception->getMessage(), $exception->getMessage() === 'conflict' ? 409 : 500); }