I don't see any way to set the status on a Result<UserPublic>. It's only on RequestWeb, as far as I can see.
> I see where you are going. Try sending null in OK and set the status to 201.
>
> On Wed, Oct 19, 2016 at 7:47 PM, Rick Mann <
rm...@latencyzero.com> wrote:
>> That's not very RESTful. A 409 CONFLICT is a good response when trying to create two users with the same ID.
>>
>> Similarly, I want to send 201 CREATED when user registration is successful.
>>
>>> On Oct 19, 2016, at 19:44 , Alex Rojkov <
roj...@gmail.com> wrote:
>>>
>>> Yep, sending errors is possible though this case requires a more
>>> general UserCreateResponse object that should either contain a
>>> UserPublic if the operation completed successfully, or exception. The
>>> cases should be distinguished by the status code that I'd recommend be
>>> included in UserCreateResponse and be a business specific error as
>>> opposed to http status.
>>>
>>> Alex
>>>
>>>
>>> On Wed, Oct 19, 2016 at 7:23 PM, Rick Mann <
rm...@latencyzero.com> wrote:
>>>> Modeling my user registration method after that in Auction, I've got this:
>>>>
>>>>
https://github.com/JetForMe/hoa/blob/master/src/main/java/com/latencyzero/hoa/AbstractHOASession.java?ts=4#L44
>>>>
>>>> But I don't see how to return an HttpStatus of 409 (CONFLICT) in the case. In addition, I want to return a completely different JSON response than the one afforded by UserPublic (something indicating the error during registration).
>>>>
>>>> Is that even possible?
>>>>
>>>>
>>>>
>>>> --
>>>> Rick Mann
>>>>
rm...@latencyzero.com
>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups "Baratine" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an email to