No need for 501 error code, as this should be returned only when needed, and will be much more efficient to not:
1.) take a table entry for the majority of cases when it isn't needed
2.) Utilize only enough memory needed to instantiate a string when it _is_ needed.
Again, nil is default for attrs not present in a table, so if you're not nil, you should just return what you know is defined. Otherwise, return the "Unknown HTTP Status" default string.