Closed bobbyiliev closed 2 months ago
Currently, the ReadUser function handles 404 errors inconsistently:
ReadUser
doRequest
nil, fmt.Errorf(...)
err != nil
Suggested Changes:
Error
Currently, the
ReadUser
function handles 404 errors inconsistently:doRequest
method returnsnil, fmt.Errorf(...)
for 404 errors:err != nil
, we immediately return the error fromReadUser
.ReadUser
, an API error handler formats errors differently for non-200 status codes, causing inconsistency: https://github.com/MaterializeInc/terraform-provider-materialize/blob/08b526afd8a7c0c44e07953ecd6d6d071220ec34/pkg/frontegg/user.go#L95-L97Suggested Changes:
Error
struct that includes the status code for clarity and uniformity.