jkakar / aws-codegen

Code generator for AWS clients in Elixir.
Other
35 stars 0 forks source link

Return the reason alongside the exception #16

Closed omarkj closed 8 years ago

omarkj commented 8 years ago

This changes the code generator to return both the Reason and the Exception, instead of only the Exception. This is because Reason can often be helpful to debug request issues.

omarkj commented 8 years ago

Return now looks something like this:

{error,{<<"com.amazon.coral.validate#ValidationException">>,
        <<"The parameter 'TableName' is required but was not present in the request">>},
       {400,
        [{<<"x-amzn-RequestId">>,
          <<"XXX">>},
         {<<"x-amz-crc32">>,<<"XXX">>},
         {<<"Content-Type">>,<<"application/x-amz-json-1.0">>},
         {<<"Content-Length">>,<<"143">>},
         {<<"Date">>,<<"Sat, 21 Nov 2015 04:24:02 GMT">>}],
        #Ref<0.0.1.1341>}}
jkakar commented 8 years ago

Thanks @omarkj!