package models import ( "api.qobiltu.id/pkg/validation" ) type Exception struct { Unauthorized bool `json:"unauthorized,omitempty"` BadRequest bool `json:"bad_request,omitempty"` DataNotFound bool `json:"data_not_found,omitempty"` InternalServerError bool `json:"internal_server_error,omitempty"` DataDuplicate bool `json:"data_duplicate,omitempty"` QueryError bool `json:"query_error,omitempty"` InvalidPasswordLength bool `json:"invalid_password_length,omitempty"` IsPassTheLimit bool `json:"is_pass_the_limit,omitempty"` IsTimeOut bool `json:"is_time_out,omitempty"` AttemptNotFound bool `json:"attempt_not_found,omitempty"` Forbidden bool `json:"forbidden,omitempty"` ValidationError bool `json:"validation_error,omitempty"` // quiz context QuizTimeExpired bool `json:"quiz_time_expired,omitempty"` QuizAlreadyPassed bool `json:"quiz_already_passed,omitempty"` QuizAttemptLimit bool `json:"quiz_attempt_limit,omitempty"` QuizAlreadyFinished bool `json:"quiz_already_finished,omitempty"` AcademyNotFinished bool `json:"academy_not_finished,omitempty"` Message string `json:"message,omitempty"` Err error `json:"-"` ValidationErrorFields []validation.ErrorMessage `json:"validation_error_fields,omitempty"` } func (a Exception) Error() string { return a.Err.Error() }