ofbiz REST error messages, was: REST, how about 'Login' map

2020-10-01 Thread Hans Bakker
Hi Girish, again thanks for your help. I updated my version here, and show the flutter Dio error messages better as explained at: https://pub.dev/packages/dio#handling-errors and now these error messages are received properly, Thanks again, Regards, Hans Bakker antwebsystems.com On

Re: REST, how about 'Login' map

2020-10-01 Thread Girish Vasmatkar
Hi Hans, if service is returning an error, it should get converted into a 422. I took your getCompanies service example from your plugin and modified the service as below def getCompanies() { Map result = success() logInfo("service starting with ${parameters.input}") result.companies

Re: REST, how about 'Login' map

2020-10-01 Thread Hans Bakker
Hi Girish, thanks for the explanation, however if i create a last statement in a groovy service: return error("this is the error message") then i get an error 500 returned, however not showing the error message of the service. Regards, Hans On 10/2/20 12:14 AM, Girish Vasmatkar wrote:

Re: REST, how about 'Login' map

2020-10-01 Thread Girish Vasmatkar
Thanks Hans. The error codes are broadly categorized in three types based on what ofbiz is generating during service call - 1. 400 Bad Request = if ServiceValidationException is thrown. This indicates client error and client must make amends to the request. Example, service's required IN

Re: REST, how about 'Login' map

2020-10-01 Thread Hans Bakker
Hi Girish, yes userLogin is working fine now, further i see you are working on the error messages? would be nice to get the ofbiz error message together with the error code 500? keep up the good work, it is getting better and better! Regards, Hans On 10/1/20 10:49 AM, Girish Vasmatkar

Re: REST, how about 'Login' map

2020-09-30 Thread Girish Vasmatkar
Hi Hans, This is now implemented/fixed with commit8545cfe . Best, Girish HotWax Systems On Tue, Sep 29, 2020 at 5:26 PM Hans Bakker wrote: > Hi Girish, thanks for your prompt reply, > > the login map

Re: REST, how about 'Login' map

2020-09-29 Thread Hans Bakker
Hi Girish, thanks for your prompt reply, the login map need to be filled when the related token is available, what is currently not the case. Not sure if this is directly related to the Auth=false parameter, you know that better, Regards, Hans On 9/29/20 4:20 PM, Girish Vasmatkar wrote:

Re: REST, how about 'Login' map

2020-09-29 Thread Girish Vasmatkar
Hi Hans Since you specifically mentioned about groovy service, I would think it is true for other services as well. It would possibly be happening, if the service itself is declared with auth=false, so no token check is happening and hence userLogin is not retrieved from the token. Can you

REST, how about 'Login' map

2020-09-28 Thread Hans Bakker
Hi Girish, thanks for your last email, that is working now too howeveranother question, If i call a service using the token i obtained earlier, i see that the userLogin map in the groovy service I called, is null can you set the login map to the userLogin of the token that was used