diff --git a/include/ircd/m/error.h b/include/ircd/m/error.h index 14a94695b..78b0e6b03 100644 --- a/include/ircd/m/error.h +++ b/include/ircd/m/error.h @@ -105,7 +105,7 @@ namespace ircd::m IRCD_M_EXCEPTION(error, BAD_REQUEST, http::BAD_REQUEST); IRCD_M_EXCEPTION(error, BAD_JSON, http::BAD_REQUEST); IRCD_M_EXCEPTION(error, NOT_JSON, http::BAD_REQUEST); - IRCD_M_EXCEPTION(error, BAD_SIGNATURE, http::UNAUTHORIZED); + IRCD_M_EXCEPTION(error, BAD_SIGNATURE, http::FORBIDDEN); IRCD_M_EXCEPTION(error, ACCESS_DENIED, http::FORBIDDEN); IRCD_M_EXCEPTION(error, FORBIDDEN, http::FORBIDDEN); IRCD_M_EXCEPTION(error, NOT_FOUND, http::NOT_FOUND); diff --git a/matrix/event.cc b/matrix/event.cc index 8ba8f09a6..b5ab79d4e 100644 --- a/matrix/event.cc +++ b/matrix/event.cc @@ -476,8 +476,9 @@ catch(const ctx::interrupted &e) } catch(const std::exception &e) { - throw m::BAD_SIGNATURE + throw m::error { + http::UNAUTHORIZED, "M_UNVERIFIABLE_SIGNATURE", "%s key %s for %s :%s", string_view{event.event_id}, keyid,