refactored and condensed technical documentation and comments across the codebase to improve readability
This commit is contained in:
@@ -60,10 +60,9 @@ abstract class TalkApi<T extends ApiResponse?> extends ApiRequest {
|
||||
|
||||
final status = data.statusCode;
|
||||
if (status < 200 || status >= 300) {
|
||||
// Talk's OCS errors put the real reason in the response body (e.g.
|
||||
// expired session, removed participant, malformed reply target).
|
||||
// Include a trimmed preview so the in-app error dialog and logs
|
||||
// surface the cause instead of just the bare status code.
|
||||
// Talk's OCS errors carry the real reason in the body (expired session,
|
||||
// removed participant, ...); include a trimmed preview so the dialog and
|
||||
// logs surface the cause instead of just the bare status code.
|
||||
final body = data.body.replaceAll(RegExp(r'\s+'), ' ').trim();
|
||||
final preview = body.length > 500 ? '${body.substring(0, 500)}…' : body;
|
||||
final detail = body.isEmpty
|
||||
|
||||
Reference in New Issue
Block a user