Make error messages context-free
email: johndoe@gmail.com
Status: REJECTED
Reasons: OTHER_VERIFICATION_FAILURE
token: 7b447fef-2a20-4936-b1bb-82e0da5d166a
I recently got this gem of an error. “OTHER” tells me nothing and immediately prompts me to ask what the real reason was.
So far, pretty obvious.
What’s interesting about this case was that someone from MY team TOLD the vendor to reject john doe. So, they rejected him on our request and just filled out other for speed sake. We told the vendor, so why would we care about the error. We know, right?
But I didn’t know that because I don’t have the entire context. All I see is “OTHER”. Without this context, other is meaningless and triggered a bunch of back and forth between us and the vendor to recount the context.
So, when writing error messages, include the context. If it’s because a user failed to respond to a request for more information, put that in the error. It’ll make everything faster because you won’t need to recount or recreate the context.