Design Guidelines for a Simple Web Service with Return Codes

I am designing a WCF service that will return a response code (e.g. 0 for success or another number for errors). In addition, all web service methods will perform several general checks (e.g. apiKey authentication).

I am wondering if there is a best practice approach or organization and receipt of these response and message codes.

Thanks for any suggestions.

+3
source share
2 answers

Ideally, do not use response codes. Return something useful on success (or void) and rule out an error on failure.

. , 99% , - . . . 2 , , , , 600 000 , -... , -, . - .

SO :

+8
+2

Source: https://habr.com/ru/post/1764182/


All Articles