Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOI-1298] New problem property to return UI messages #79

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public abstract class Problem : BaseModel
public abstract string detail { get; }
public abstract int status { get; }
public abstract int errorCode { get; }
public virtual string message { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if adding this property to the base class is a good idea because it does not follow Problem Details for HTTP APIs Standard.

Also, it could be a problem for the localization. In place, The clients could use error and status codes to infer the right message or, if you want a generic non-localizable message you could use detail field.


public virtual string type =>
$"{Path}{status}.{errorCode}-{title.ToLower().Replace(", ", ",").Replace(",", " ").Replace(" ", "-")}";
Expand Down
Loading