← Repo overview
/
langchain-ai/ langchain
/
search
@f5ef8cb
93 matches across 17 files for error lang:YAML lang:YAML lang:YAML lang:YAML lang:YAML lang:YAML lang:YAML lang:YAML lang:YAML
snippet_mode: grep · sorted by relevance
105
106 def bad_code(inputs) -> int:
107 ▶ raise NotImplementedError('For demo purpose')
108
109 chain = RunnableLambda(bad_code)
· · ·
111 - type: textarea
112 attributes:
113 ▶ label: Error Message and Stack Trace (if applicable)
114 description: |
115 If you are reporting an error, please copy and paste the full error message and
· · ·
115 ▶ If you are reporting an error, please copy and paste the full error message and
116 stack trace.
117 (This will be automatically formatted into code, so no need for backticks.)
· · ·
122 label: Description
123 description: |
124 ▶ What is the problem, question, or error?
125
126 Write a short description telling what you are doing, what you expect to happen, and what is currently happening.
1 ▶ # Validates that a package's integration tests compile without syntax or import errors.
2 #
3 # (If an integration test fails to compile, it won't run.)
111 resolved="${GITHUB_WORKSPACE}/${CLI_PATH}"
112 if [ ! -d "${resolved}" ]; then
113 ▶ echo "::error::cli-path '${CLI_PATH}' does not exist at ${resolved}"
114 exit 1
115 fi
· · ·
136 run: |
137 echo "${PROVIDERS_JSON}" | jq -e 'type == "array" and length > 0' > /dev/null || {
138 ▶ echo "::error::providers input must be a non-empty JSON array"
139 exit 1
140 }
· · ·
141 echo "${PROVIDERS_JSON}" | jq -e 'all(has("provider") and has("data_dir"))' > /dev/null || {
142 ▶ echo "::error::every entry in providers must have 'provider' and 'data_dir' keys"
143 exit 1
144 }
· · ·
159 --provider "${provider}" \
160 --data-dir "${GITHUB_WORKSPACE}/${data_dir}"; then
161 ▶ echo "::error::Failed to refresh provider: ${provider}"
162 failed="${failed} ${provider}"
163 fi
· · ·
164 done
165 if [ -n "${failed}" ]; then
166 ▶ echo "::error::The following providers failed:${failed}"
167 exit 1
168 fi
151 import sys
152 import tomllib
153 ▶ import urllib.error
154 import urllib.request
155
· · ·
172 if requested_version and normalize(requested_version) != normalize(version):
173 print(
174 ▶ f"::error::Requested release version {requested_version!r} does "
175 f"not match {pkg_name} pyproject.toml version {version!r}."
176 )
· · ·
186 with urllib.request.urlopen(url, timeout=10):
187 already_published = True
188 ▶ except urllib.error.HTTPError as err:
189 if err.code == 404:
190 already_published = False
· · ·
192 # Fail closed: an unexpected status means we can't verify.
193 print(
194 ▶ f"::error::PyPI returned HTTP {err.code} checking whether "
195 f"{pkg_name}=={version} exists; cannot verify, aborting."
196 )
· · ·
197 sys.exit(1)
198 ▶ except urllib.error.URLError as err:
199 # Fail closed: if PyPI is unreachable we must not assume the version
200 # is free, or we risk re-publishing an existing release.
+ 2 more matches in this file
50 } catch (e) {
51 if (e.status !== 404) {
52 ▶ throw new Error(`getLabel(${labelName}) failed: ${e.message}`);
53 }
54 try {
· · ·
63 const alreadyExists =
64 createErr.status === 422 &&
65 ▶ Array.isArray(createErr.errors) &&
66 createErr.errors.some(e => e.code === 'already_exists');
67 if (!alreadyExists) throw createErr;
· · ·
66 ▶ createErr.errors.some(e => e.code === 'already_exists');
67 if (!alreadyExists) throw createErr;
68 }
48 semver='^[0-9]+\.[0-9]+\.[0-9]+$'
49 if [[ ! "$current" =~ $semver ]]; then
50 ▶ echo "::error::Could not parse current uv pin from $action_file (got '$current')"
51 exit 1
52 fi
· · ·
53 if [[ ! "$latest" =~ $semver ]]; then
54 ▶ echo "::error::Unexpected uv tag from GitHub API (got '$latest')"
55 exit 1
56 fi
· · ·
139 action_file=".github/actions/uv_setup/action.yml"
140
141 ▶ # `grep -c` returns 1 on no-match and 2 on read errors. We want
142 # "no match" surfaced as the explicit count-of-zero check below;
143 # read errors must abort. Capture the exit code separately so
· · ·
143 ▶ # read errors must abort. Capture the exit code separately so
144 # `set -e` doesn't swallow either case.
145 set +e
· · ·
148 set -e
149 if [ "$before_rc" -gt 1 ]; then
150 ▶ echo "::error::grep read error on $action_file (exit=$before_rc)"
151 exit 1
152 fi
+ 3 more matches in this file
58 )
59 if [ ${#files[@]} -eq 0 ]; then
60 ▶ echo "::error::No pyproject.toml files found under libs/"
61 exit 1
62 fi
· · ·
68 done
69 if [ ${#failed[@]} -gt 0 ]; then
70 ▶ echo "::error::Extras-sync check failed for ${#failed[@]} package(s):"
71 printf '::error:: %s\n' "${failed[@]}"
72 exit 1
· · ·
71 ▶ printf '::error:: %s\n' "${failed[@]}"
72 exit 1
73 fi
125 # New manifest: absent at the base ref, so not a version bump.
126 continue
127 ▶ print(f"::error file={manifest}::failed to read base manifest: {stderr}")
128 sys.exit(1)
129 base = project_table(shown.stdout)
· · ·
188 project = data.get("project")
189 if project is None:
190 ▶ print(f"::error file={manifest_path}::no [project] table to resolve")
191 sys.exit(1)
192
· · ·
242 else
243 # Surface the resolver's reason (stdout+stderr were captured) and tell a
244 ▶ # likely-transient index/network error apart from a genuinely bad pin.
245 cat "$filtered_dir/compile.log"
246 if grep -qiE 'error sending request|failed to fetch|error trying to connect|connection|timed out|temporarily unavailable|status code (429|50[0-9])' "$filtered_dir/compile.log"; then
· · ·
246 ▶ if grep -qiE 'error sending request|failed to fetch|error trying to connect|connection|timed out|temporarily unavailable|status code (429|50[0-9])' "$filtered_dir/compile.log"; then
247 echo "❌ ${pkg_dir}: resolver hit a possible transient PyPI/index error"
248 transient=1
· · ·
247 ▶ echo "❌ ${pkg_dir}: resolver hit a possible transient PyPI/index error"
248 transient=1
249 else
+ 2 more matches in this file
43 # in sync with pyproject.toml. Don't let it pass unchecked.
44 echo "--- $dir ---"
45 ▶ echo "Error: $dir has a _version.py but no 'check_version' Makefile target"
46 FAILED=1
47 fi
66 run: |
67 if [ -z "${{ steps.app-token.outputs.token }}" ]; then
68 ▶ echo "::error::GitHub App token generation failed — cannot classify contributor"
69 exit 1
70 fi
9 # Examples:
10 # feat(core): add multi‐tenant support
11 ▶ # fix(langchain): resolve error
12 # docs: update API usage examples
13 # docs(openai): update API usage examples
· · ·
72 run: |
73 if [[ "$PR_TITLE" =~ ^[a-z]+\(\)[!]?: ]]; then
74 ▶ echo "::error::PR title has empty scope parentheses: '$PR_TITLE'"
75 echo "Either remove the parentheses or provide a scope (e.g., 'fix(core): ...')."
76 exit 1
71 // Comment write paths can fail for several reasons that should not
72 // turn this advisory job red on its own: fork PRs run with
73 ▶ // restricted tokens, secondary rate limits, transient API errors.
74 // Fall back to `core.summary` so a maintainer can paste the
75 // remediation manually. The check still fails — `setFailed` is
· · ·
99 }
100 } catch (commentErr) {
101 ▶ core.warning(`Could not post sticky comment (fork PR token, rate limit, or transient API error): ${commentErr.message}`);
102 await core.summary
103 .addHeading(summaryHeading)
53 }));
54 } catch (e) {
55 ▶ throw new Error(
56 `Failed to search for closed PRs to reopen after assigning ${assignee} ` +
57 `to #${issueNumber} (HTTP ${e.status ?? 'unknown'}): ${e.message}`,
· · ·
120 continue;
121 }
122 ▶ // Transient errors (rate limit, 5xx) should fail the job so
123 // the label is NOT removed and the run can be retried.
124 throw e;
86 const sender = context.payload.sender?.login;
87 if (!sender) {
88 ▶ throw new Error('Event has no sender — cannot check permissions');
89 }
90 try {
· · ·
105 }
106 const status = e.status ?? 'unknown';
107 ▶ throw new Error(
108 `Permission check failed for ${sender} (HTTP ${status}): ${e.message}`,
109 );
· · ·
264 console.log(`PR author "${prAuthor}" is NOT assigned to #${num} (assignees: ${assignees.join(', ') || 'none'})`);
265 }
266 ▶ } catch (error) {
267 if (error.status === 404) {
268 console.log(`Issue #${num} not found — skipping`);
· · ·
267 ▶ if (error.status === 404) {
268 console.log(`Issue #${num} not found — skipping`);
269 } else {
· · ·
270 ▶ // Non-404 errors (rate limit, server error) must not be
271 // silently skipped — they could cause false enforcement
272 // (closing a legitimate PR whose assignment can't be verified).
+ 4 more matches in this file
70 # Validate repository format (allow any org with proper format)
71 if [[ ! "$repo" =~ ^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$ ]]; then
72 ▶ echo "Error: Invalid repository format: $repo"
73 exit 1
74 fi
· · ·
78 # Additional validation for repo name
79 if [[ ! "$REPO_NAME" =~ ^[a-zA-Z0-9_.-]+$ ]]; then
80 ▶ echo "Error: Invalid repository name: $REPO_NAME"
81 exit 1
82 fi
18 title: Direction
19 type: string
20 ▶ HTTPValidationError:
21 properties:
22 detail:
· · ·
23 items:
24 ▶ $ref: "#/components/schemas/ValidationError"
25 title: Detail
26 type: array
· · ·
27 ▶ title: HTTPValidationError
28 type: object
29 PublicCues:
· · ·
80 title: Style
81 type: string
82 ▶ ValidationError:
83 properties:
84 loc:
· · ·
93 type: string
94 type:
95 ▶ title: Error Type
96 type: string
97 required:
+ 13 more matches in this file
18 title: Direction
19 type: string
20 ▶ HTTPValidationError:
21 properties:
22 detail:
· · ·
23 items:
24 ▶ $ref: '#/components/schemas/ValidationError'
25 title: Detail
26 type: array
· · ·
27 ▶ title: HTTPValidationError
28 type: object
29 PublicCues:
· · ·
80 title: Style
81 type: string
82 ▶ ValidationError:
83 properties:
84 loc:
· · ·
93 type: string
94 type:
95 ▶ title: Error Type
96 type: string
97 required:
+ 13 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter
Search any public repo from your terminal
This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.