Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Vous consultez la documentation d'Apigee X. Consultez la documentation d'Apigee Edge.
UnresolvedVariable
Code d'erreur
steps.httpmodifier.UnresolvedVariable
Corps de la réponse d'erreur
{"fault":{"faultstring":"HTTPModifier[policy_name]: unable to resolve variable [variable_name]","detail":{"errorcode":"steps.httpmodifier.UnresolvedVariable"}}}
Cause
Cette erreur se produit si une variable spécifiée dans la règle HTTPModifier répond à l'une des conditions suivantes :
hors du champ d'application (non disponible dans le flux spécifique où la règle est exécutée), ou
impossible à résoudre (non définie).
Diagnostic
Identifiez la règle HTTPModifier dans laquelle l'erreur s'est produite et le nom de la variable qui n'est pas disponible. Vous pouvez trouver ces deux éléments dans l'élément faultstring de la réponse d'erreur.
Par exemple, dans l'élément faultstring suivant, le nom de la règle est googleBook et la variable est var :
"faultstring":"HTTPModifier[googleBook]: unable to resolve variable var"
Dans le fichier XML de la règle HTTPModifier ayant échoué, vérifiez que le nom de la variable utilisée correspond au nom de la variable identifié dans la chaîne d'erreur (étape 1 ci-dessus).
Déterminez si la variable est définie et disponible dans le flux dans lequel la règle HTTPModifier est en cours d'exécution.
Si la variable est :
hors du champ d'application (non disponible dans le flux spécifique où la règle est exécutée), ou
impossible à résoudre (non définie),
alors il s'agit de la cause de l'erreur.
Vérifiez si la variable est définie dans l'une des stratégies exécutées avant la règle HTTPModifier dans le flux de requêtes. Si la variable n'a pas été définie, vous recevez le code d'erreur :
steps.httpmodifier.UnresolvedVariable
Solution
Vérifiez que la variable référencée dans la stratégie existe et qu'elle est disponible dans le flux spécifique où la règle HTTPModifier est en cours d'exécution.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThis documentation addresses the \u003ccode\u003esteps.httpmodifier.UnresolvedVariable\u003c/code\u003e error in Apigee X, which occurs when a variable referenced in an HTTPModifier policy is either out of scope or undefined.\u003c/p\u003e\n"],["\u003cp\u003eThe error's \u003ccode\u003efaultstring\u003c/code\u003e provides the policy name and the specific variable that could not be resolved, which can then be used to locate the source of the problem.\u003c/p\u003e\n"],["\u003cp\u003eDiagnosis involves confirming the variable name in the HTTPModifier policy XML, then checking whether the variable is defined and available in the current flow.\u003c/p\u003e\n"],["\u003cp\u003eThe root cause is either the variable is not defined, or it exists but is not available in the flow where the HTTPModifier policy is executed.\u003c/p\u003e\n"],["\u003cp\u003eResolution involves ensuring that the referenced variable exists and is accessible within the specific flow where the HTTPModifier policy is being executed, typically by defining it in a preceding policy.\u003c/p\u003e\n"]]],[],null,["# HTTPModifier runtime error troubleshooting\n\n*You're viewing **Apigee X** documentation.\nView [Apigee Edge](https://docs.apigee.com) documentation.*\n| **Note:** Was this troubleshooting playbook helpful? Please let us know by clicking [Send Feedback]().\n\nUnresolvedVariable\n------------------\n\n### Error code\n\n steps.httpmodifier.UnresolvedVariable\n\n### Error response body\n\n```transact-sql\n{\n \"fault\": {\n \"faultstring\": \"HTTPModifier[\u003cvar translate=\"no\"\u003epolicy_name\u003c/var\u003e]: unable to resolve variable [\u003cvar translate=\"no\"\u003evariable_name\u003c/var\u003e]\",\n \"detail\": {\n \"errorcode\": \"steps.httpmodifier.UnresolvedVariable\"\n }\n }\n}\n```\n\n### Cause\n\nThis error occurs if a variable specified in the [HTTPModifier policy](/apigee/docs/api-platform/reference/policies/http-modifier-policy) is either:\n\n- out of scope (not available in the specific flow where the policy is being executed) or\n- can't be resolved (is not defined)\n\n### Diagnosis\n\n1. Identify the HTTPModifier policy where the error occurred and the name of the variable that is not available. You can find both of these items in the `faultstring` element of the error response.\n\n For example, in the following `faultstring`, the policy name is `googleBook` and the variable is `var`: \n\n \"faultstring\": \"HTTPModifier[googleBook]: unable to resolve variable var\"\n\n2. In the failed HTTPModifier policy XML, verify that the name of the variable used matches the variable name identified in the fault string (step #1 above).\n\n3. Determine if the variable is defined and available in the flow in which the HTTPModifier policy is being executed.\n\n4. If the variable is either:\n\n 1. out of scope (not available in the specific flow where the policy is being executed) or\n 2. can't be resolved (is not defined)\n\n then that's the cause for the error.\n\n Check if the variable is defined in any of the policies that are executed before the HTTPModifier policy in the request flow. If the variable has not been defined, then you will receive the error code: \n\n steps.httpmodifier.UnresolvedVariable\n\n### Resolution\n\nEnsure that the variable referenced in the policy exists and is available in the specific flow, where the HTTPModifier policy is being executed."]]