Skip to content

Commit

Permalink
response warning added (#98)
Browse files Browse the repository at this point in the history
* response warning added

* version updated
  • Loading branch information
M-Naveed-Ashraf authored Sep 23, 2024
1 parent 2e62913 commit a03fd83
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "promptlayer",
"license": "MIT",
"version": "1.0.10",
"version": "1.0.11",
"main": "dist/index.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ const getPromptTemplate = async (
);
return null;
}
if(data.warning){
console.warn(
`WARNING: While tracking your prompt PromptLayer had the following error: ${data.warning}`
);
}
return data as Promise<GetPromptTemplateResponse>;
} catch (e) {
console.warn(
Expand Down

0 comments on commit a03fd83

Please sign in to comment.