Log missing Crisp managed key before failing
The Crisp ownership check returned a generic internal error when the managed plugin token was unset without logging server side, unlike the sibling plugin-ID branch and every other internal path in the file. A deployment with the token unconfigured but the provider somehow surfaced would produce an undiagnosable error. Log the condition first, mirroring the plugin-ID branch. Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
@@ -113,6 +113,8 @@ func (r *Resolver) verifyCrispOwnershipWith(ctx context.Context, input types.Cre
|
|||||||
// here; treat its absence as an internal error rather than client input.
|
// here; treat its absence as an internal error rather than client input.
|
||||||
managedKey, ok := r.providerRegistry.ManagedAPIKey(input.Provider)
|
managedKey, ok := r.providerRegistry.ManagedAPIKey(input.Provider)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
r.logger.ErrorCtx(ctx, "crisp managed api key not configured")
|
||||||
|
|
||||||
return gqlutils.Internal(ctx)
|
return gqlutils.Internal(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user