DNSManager: add some error messages.
This commit is contained in:
parent
ad7ee31806
commit
e77829b7a6
@ -109,6 +109,27 @@ type ErrorUserNotLogged = { }
|
||||
codecErrorUserNotLogged ∷ CA.JsonCodec ErrorUserNotLogged
|
||||
codecErrorUserNotLogged = CA.object "ErrorUserNotLogged" (CAR.record { })
|
||||
|
||||
{- 5 -}
|
||||
type DomainNotFound = { }
|
||||
codecDomainNotFound :: CA.JsonCodec DomainNotFound
|
||||
codecDomainNotFound = CA.object "DomainNotFound" (CAR.record { })
|
||||
|
||||
{- 6 -}
|
||||
type RRNotFound = { }
|
||||
codecRRNotFound :: CA.JsonCodec RRNotFound
|
||||
codecRRNotFound = CA.object "RRNotFound" (CAR.record { })
|
||||
|
||||
{- 7 -}
|
||||
type UnacceptableDomain = { }
|
||||
codecUnacceptableDomain :: CA.JsonCodec UnacceptableDomain
|
||||
codecUnacceptableDomain = CA.object "UnacceptableDomain" (CAR.record { })
|
||||
|
||||
{- 8 -}
|
||||
type InvalidDomainName = { }
|
||||
codecInvalidDomainName :: CA.JsonCodec InvalidDomainName
|
||||
codecInvalidDomainName = CA.object "InvalidDomainName" (CAR.record { })
|
||||
|
||||
|
||||
{- 10 -}
|
||||
-- For now, Error is just an alias on String.
|
||||
-- type InvalidZone = { errors : Array(Storage::Zone::Error) }
|
||||
@ -168,6 +189,10 @@ data AnswerMessage
|
||||
| MkErrorInvalidToken ErrorInvalidToken -- 2
|
||||
| MkDomainAlreadyExists DomainAlreadyExists -- 3
|
||||
| MkErrorUserNotLogged ErrorUserNotLogged -- 4
|
||||
| MkDomainNotFound DomainNotFound -- 5
|
||||
| MkRRNotFound RRNotFound -- 6
|
||||
| MkUnacceptableDomain UnacceptableDomain -- 7
|
||||
| MkInvalidDomainName InvalidDomainName -- 8
|
||||
| MkInvalidZone InvalidZone -- 10
|
||||
| MkDomainChanged DomainChanged -- 11
|
||||
| MkZone Zone -- 12
|
||||
@ -206,6 +231,10 @@ decode number string
|
||||
2 -> error_management codecErrorInvalidToken MkErrorInvalidToken
|
||||
3 -> error_management codecDomainAlreadyExists MkDomainAlreadyExists
|
||||
4 -> error_management codecErrorUserNotLogged MkErrorUserNotLogged
|
||||
5 -> error_management codecDomainNotFound MkDomainNotFound
|
||||
6 -> error_management codecRRNotFound MkRRNotFound
|
||||
7 -> error_management codecUnacceptableDomain MkUnacceptableDomain
|
||||
8 -> error_management codecInvalidDomainName MkInvalidDomainName
|
||||
10 -> error_management codecInvalidZone MkInvalidZone
|
||||
11 -> error_management codecDomainChanged MkDomainChanged
|
||||
12 -> error_management codecZone MkZone
|
||||
|
Loading…
Reference in New Issue
Block a user