use Custom status code

thanks, @fdb-hiroshima

Co-Authored-By: fdb-hiroshima <35889323+fdb-hiroshima@users.noreply.github.com>
This commit is contained in:
Igor Galić 2019-08-20 14:43:20 +02:00 committed by GitHub
parent 064dd79eef
commit 169469816d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,7 +123,7 @@ pub fn domain_validation(
if now.duration_since(*valid_until).as_secs() > 0 {
validation_map.remove(&validation_id);
// don't know how to cast Status::Gone to u16
return Status::new(410, "validation expired");
return Custom(Status::Gone, "validation expired");
}
validation_map.remove(&validation_id);