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

VndErrors.VndError#logRef is not optional #478

Closed
matlach opened this issue Aug 9, 2016 · 1 comment
Closed

VndErrors.VndError#logRef is not optional #478

matlach opened this issue Aug 9, 2016 · 1 comment
Labels
in: mediatypes Media type related functionality
Milestone

Comments

@matlach
Copy link

matlach commented Aug 9, 2016

According to the specification https://github.com/blongden/vnd.error

logref

OPTIONAL

For expressing a (numeric/alpha/alphanumeric) identifier to refer to the specific error on the server side for logging purposes (i.e. a request number).

The logref attribute should be optional. Though, in Spring org.springframework.hateoas.VndErrors.VndError:

        /**
         * Creates a new {@link VndError} with the given logref, a message as well as some {@link Link}s.
         * 
         * @param logref must not be {@literal null} or empty.
         * @param message must not be {@literal null} or empty.
         * @param links
         */
        public VndError(String logref, String message, Link... links) {

            Assert.hasText(logref, "Logref must not be null or empty!");
            Assert.hasText(message, "Message must not be null or empty!");

            this.logref = logref;
            this.message = message;
            this.add(Arrays.asList(links));
        }
@gregturn
Copy link
Contributor

Resolved via 4f3be11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: mediatypes Media type related functionality
Projects
None yet
Development

No branches or pull requests

2 participants