nickva commented on a change in pull request #13:
URL: https://github.com/apache/couchdb-erlfdb/pull/13#discussion_r571495726



##########
File path: src/erlfdb_error.erl
##########
@@ -0,0 +1,152 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+%   http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+-module(erlfdb_error).
+
+-export([
+    error_name/1
+]).
+
+error_name(0) ->

Review comment:
       Good point. Yeah, I think I like that better. Then we won't have to 
manually synchronize error codes with foundationdb. 
   
   But maybe we can still include the numeric error value in the error 
response. So we'll have both the error number and the description.
   
   Also I was curious what happens to the error string if the client connects 
to an older version of the server an gets an unknown error:
   
   ```
   ([email protected])2> erlfdb:get_error_string(2059).
   <<"UNKNOWN_ERROR">>
   ```
   
   
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to