#6421·PeerTube

Dereference error type field in REST API documentation

Author: SchoumiCreated May 28, 2024Updated Sep 7, 2026
LabelsStatus: In Progress :soon:Type: Feature Request :sparkles:Component: Documentation :books:

Describe the current behavior

The documentation says that code and error in JSON errors are now deprectated and replaced by type and details. I'm not sure why you come to change type to an URL that leads nowhere (no documentation in the end) who is less clearer and parsable than code.

json
{
"type":"https://docs.joinpeertube.org/api-rest-reference.html#section/Errors/missing_two_factor",
"detail":"Missing two factor header",
"status":401,
"docs":"https://docs.joinpeertube.org/api-rest-reference.html#operation/getOAuthToken",
"code":"missing_two_factor",
"error":"Missing two factor header"
}

Steps to reproduce

No response

Describe the expected behavior

It's easier for client apps to make some treatment based on code than type now. if you really want to go to URI something like: "error://peertube/auth/missing_two_factor" will be better than we have now. We get that the error is from peertube, about auth. If you don't go to separate error code in sub sections i'm not sure the type improve anything.

Additional information

No response