This should make sure these errors are synchronized with that from controller events HS_DESC HS_DESC_CONTENT HSFETCH HSPOST and other semantics and logging. I submitted a bunch of bugs and enhance on HS* controller command and event failures that can be trac searched and integrated with this. Some may have been prematurely closed. There have also been past talk about SOCKS5 on the list related to returning of some more errors codes via SOCKS5.
Update also https://gitweb.torproject.org/torspec.git/tree/socks-extensions.txt
David Goulet dgoulet@torproject.org writes:
Filename: 304-socks5-extending-hs-error-codes.txt Title: Extending SOCKS5 Onion Service Error Codes Author: David Goulet, George Kadianakis Created: 22-May-2019 Status: Open
Merged to torspec as proposal 304! :)