John, 

        Let me take a step back here and try to explain a general 
reasoning of why API's for the different products behave differently. We 
as a wholesaler serve a channel of about 6000 resellers, each with there 
unique business processes requirements and frontend languages. Our 
customers need to be able to integrate our API's into their system and be 
able to follow their own business processes based on what happens to their 
requests sent to OpenSRS system. They also should be able to generate an 
end-user message using a language of their preference. We also see a need 
to simplify reseller's life by providing him/her with an accurate error 
message (you'll be surprised how many reseller are looking for there 
processed order just to find out it was pended). 
        To support this the newer APIs return an accurate message that 
will allow the reseller to see why the request to the system failed, with 
that error message we will also return an error code specific to the 
failure so the reseller is able to take appropriate action (IMHO doing 
this based on the error code is simpler than parsing our messages which 
are not guaranteed to remain the same). Our client code implementation 
includes basic error code/message conversion along with specific handling 
for the code 7502 - which is the code indicated that reseller did not 
have enough funds to process the order.

> Not sure if this is consistent with behavior of other OpenSRS products or
> even logical. Domains don't return an error code if there is an insufficient
> balance.
I agree it is not 100% consistent, but we have to start the process of 
improving our API's somewhere. New protocol seemed like a logical choice.

> That makes sense - the error is either confusing to the customer ("Failed to
> create order: Insufficient balance - the customer might think you are
> talking about their balance) or embarrassing to the reseller (Customer would
> think you don't pay your bills or something).
I agree, it does not make any sense if you assume that the error is for 
the end user. But the error is there for you along with the code.


I would be interested to hear the feedback from the other members of this 
list on this issue.


Leonid Igolnik
OpenSRS developer.

Reply via email to