update json error methods

This commit is contained in:
2023-04-18 13:52:07 -07:00
parent 952bfe906e
commit 4c3e224db6
3 changed files with 28 additions and 3 deletions

View File

@@ -1,6 +1,9 @@
package types
import "os"
import (
"fmt"
"os"
)
type AddVoiceResponse struct {
VoiceID string `json:"voice_id"`
@@ -143,6 +146,11 @@ type ValidationError struct {
Msg string `json:"msg"`
Type_ string `json:"type"`
}
func (ve ValidationError) Error() string {
return fmt.Sprintf("%s %s: ", ve.Type_, ve.Msg)
}
type VerificationAttemptResponseModel struct {
Text string `json:"text"`
DateUnix int32 `json:"date_unix"`