Javatar81 / operator-gen

An code generator that generates CRDs and reconcilers
0 stars 1 forks source link

Store Api errors in custom resource status #1

Open Javatar81 opened 6 months ago

Javatar81 commented 6 months ago

Problem to read unexpected status codes https://github.com/microsoft/kiota/issues/3744

Javatar81 commented 3 months ago

Store the error into additional data and read it later in the reconciler.

if(resp.statusCode() >= 400) {
       desired.getAdditionalData().put("error", resp.bodyAsString());
}