When the server returns a plain-text error (e.g., "ERROR: Access denied ...") before the JSON protocol starts, sendV2() would pass it through JSONSerialization which throws a confusing NSCocoaErrorDomain 3840 error. Now sendV2() checks for "ERROR:" prefix and surfaces the real message. Also includes the raw response in the fallback error for easier debugging. Fixes https://github.com/manaflow-ai/cmux/issues/188 |
||
|---|---|---|
| .. | ||
| cmux.swift | ||