refactor: update AuthenticatedUser model to require id and remove password, enhance server URI handling in AddNewServer widget

This commit is contained in:
Dr-Blank 2024-10-04 02:31:51 -04:00
parent eda45efbce
commit fa815ae206
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
10 changed files with 297 additions and 72 deletions

View file

@ -7,14 +7,18 @@ final _logger = Logger('ErrorResponse');
class ErrorResponseHandler {
String? name;
http.Response _response;
bool logRawResponse;
ErrorResponseHandler({
this.name,
http.Response? response,
this.logRawResponse = false,
}) : _response = response ?? http.Response('', 418);
void storeError(http.Response response, [Object? error]) {
_logger.fine('for $name got response: ${response.obfuscate()}');
if (logRawResponse) {
_logger.fine('for $name got response: ${response.obfuscate()}');
}
_response = response;
}