Currencies request debug, sign now is handled in statement results

This commit is contained in:
Blue 2024-03-28 20:20:21 -03:00
parent db37abacd2
commit 07003c2fe6
Signed by: blue
GPG key ID: 9B203B252A63EE38
9 changed files with 24 additions and 17 deletions

View file

@ -69,10 +69,10 @@ void Handler::AddAsset::handle (Request& request) {
} catch (const DB::NoSession& e) {
return error(request, Response::Status::unauthorized);
} catch (const std::exception& e) {
std::cerr << "Exception on poll:\n\t" << e.what() << std::endl;
std::cerr << "Exception on " << path << ":\n\t" << e.what() << std::endl;
return error(request, Response::Status::internalError);
} catch (...) {
std::cerr << "Unknown exception on poll" << std::endl;
std::cerr << "Unknown exception on " << path << std::endl;
return error(request, Response::Status::internalError);
}
}

View file

@ -50,10 +50,10 @@ void Handler::DeleteAsset::handle (Request& request) {
} catch (const DB::NoSession& e) {
return error(request, Response::Status::unauthorized);
} catch (const std::exception& e) {
std::cerr << "Exception on poll:\n\t" << e.what() << std::endl;
std::cerr << "Exception on " << path << ":\n\t" << e.what() << std::endl;
return error(request, Response::Status::internalError);
} catch (...) {
std::cerr << "Unknown exception on poll" << std::endl;
std::cerr << "Unknown exception on " << path << std::endl;
return error(request, Response::Status::internalError);
}
}

View file

@ -42,10 +42,10 @@ void Handler::ListAssets::handle (Request& request) {
} catch (const DB::NoSession& e) {
return error(request, Response::Status::unauthorized);
} catch (const std::exception& e) {
std::cerr << "Exception on poll:\n\t" << e.what() << std::endl;
std::cerr << "Exception on " << path << ":\n\t" << e.what() << std::endl;
return error(request, Response::Status::internalError);
} catch (...) {
std::cerr << "Unknown exception on poll" << std::endl;
std::cerr << "Unknown exception on " << path << std::endl;
return error(request, Response::Status::internalError);
}
}

View file

@ -42,10 +42,10 @@ void Handler::MyCurrencies::handle (Request& request) {
} catch (const DB::NoSession& e) {
return error(request, Response::Status::unauthorized);
} catch (const std::exception& e) {
std::cerr << "Exception on poll:\n\t" << e.what() << std::endl;
std::cerr << "Exception on " << path << ":\n\t" << e.what() << std::endl;
return error(request, Response::Status::internalError);
} catch (...) {
std::cerr << "Unknown exception on poll" << std::endl;
std::cerr << "Unknown exception on " << path << std::endl;
return error(request, Response::Status::internalError);
}
}

View file

@ -33,10 +33,10 @@ void Handler::Poll::handle (Request& request) {
} catch (const DB::NoSession& e) {
return error(request, Result::tokenProblem, Response::Status::unauthorized);
} catch (const std::exception& e) {
std::cerr << "Exception on poll:\n\t" << e.what() << std::endl;
std::cerr << "Exception on " << path << ":\n\t" << e.what() << std::endl;
return error(request, Result::unknownError, Response::Status::internalError);
} catch (...) {
std::cerr << "Unknown exception on poll" << std::endl;
std::cerr << "Unknown exception on " << path << std::endl;
return error(request, Result::unknownError, Response::Status::internalError);
}
}