package Ġcom . or uy an ke . vt bs Ċ Ċ import Ġio . ktor . http . HttpStatusCode Ċ Ċ open Ġclass ĠResponse Exception ( val Ġcode : ĠHttpStatusCode , Ġmsg : ĠString ) Ġ: Ġjava . lang . RuntimeException ( msg ) Ċ Ċ class ĠBadRequest Exception ( msg : ĠString ) Ġ: ĠResponse Exception ( HttpStatusCode . BadRequest , Ġmsg ) Ċ Ċ open Ġclass ĠLogin Exception ( uid : ĠString , Ġreason : ĠString ) Ġ: ĠResponse Exception ( ĊĠĠĠ ĠHttpStatusCode . Forbidden , ĊĠĠĠ Ġ" Login Ġfailed Ġfor Ġ$ uid : Ġ$ reason " Ċ ) Ċ Ċ open Ġclass ĠRegister Exception ( uid : ĠString , Ġreason : ĠString ) Ġ: ĠResponse Exception ( ĊĠĠĠ ĠHttpStatusCode . Forbidden , ĊĠĠĠ Ġ" Register Ġfailed Ġfor Ġ$ uid : Ġ$ reason " Ċ ) Ċ Ċ class ĠUser NotFoundException ( uid : ĠString , Ġreason : ĠString ) Ġ: ĠLogin Exception ( ĊĠĠĠ Ġuid , ĊĠĠĠ Ġ" User Ġ'$ uid ' Ġnot Ġfound : Ġ$ reason " Ċ ) Ċ Ċ class ĠPassword Mismatch Exception ( uid : ĠString ) Ġ: ĠLogin Exception ( ĊĠĠĠ Ġuid , ĊĠĠĠ Ġ" Wrong Ġpassword Ġor Ġaccount " Ċ ) Ċ Ċ class ĠUser Exist Exception ( uid : ĠString ) Ġ: ĠRegister Exception ( ĊĠĠĠ Ġuid , ĊĠĠĠ Ġ" UserId Ġ'$ uid ' Ġalready Ġexists " Ċ ) Ċ Ċ open Ġclass ĠAuth Required Exception ( msg : ĠString Ġ= Ġ" Please Ġlogin Ġfirst ") Ġ: ĠResponse Exception ( ĊĠĠĠ ĠHttpStatusCode . Forbidden , ĊĠĠĠ Ġmsg Ċ ) Ċ Ċ class ĠSession NotFoundException Ġ: ĠAuth Required Exception (" Session Ġnot Ġfound ") Ċ Ċ class ĠSession Expired Exception Ġ: ĠAuth Required Exception (" Session Ġexpired ") Ċ Ċ class ĠInvalid Session Exception Ġ: ĠAuth Required Exception (" Invalid Ġsession ") Ċ Ċ open Ġclass ĠPermission Denied ( msg : ĠString Ġ= Ġ" Permission Ġdenied ") Ġ: ĠResponse Exception ( ĊĠĠĠ ĠHttpStatusCode . Forbidden , ĊĠĠĠ Ġmsg Ċ ) Ċ Ċ class ĠRoot Required Exception Ġ: ĠPermission Denied ( ĊĠĠĠ Ġ" You Ġare Ġnot Ġroot Ġ: )" Ċ ) Ċ