From 3f98f182a8a55ee185ecce9c6a91609e1e4c9d71 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Fri, 15 Aug 2025 17:03:19 -0700 Subject: [PATCH] Update error messages to reference application logs for traceback details --- app/backend/error.py | 2 +- .../test_app/test_ask_handle_exception/client0/result.json | 2 +- .../test_app/test_ask_handle_exception/client1/result.json | 2 +- .../test_app/test_chat_handle_exception/client0/result.json | 2 +- .../test_app/test_chat_handle_exception/client1/result.json | 2 +- .../client0/result.jsonlines | 2 +- .../client1/result.jsonlines | 2 +- .../test_chat_stream_handle_exception/client0/result.json | 2 +- .../test_chat_stream_handle_exception/client1/result.json | 2 +- tests/test_cosmosdb.py | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/backend/error.py b/app/backend/error.py index 0a21afe6b7..7718e9ab67 100644 --- a/app/backend/error.py +++ b/app/backend/error.py @@ -4,7 +4,7 @@ from quart import jsonify ERROR_MESSAGE = """The app encountered an error processing your request. -If you are an administrator of the app, view the full error in the logs. See aka.ms/appservice-logs for more information. +If you are an administrator of the app, check the application logs for a full traceback. Error type: {error_type} """ ERROR_MESSAGE_FILTER = """Your message contains content that was flagged by the OpenAI content filter.""" diff --git a/tests/snapshots/test_app/test_ask_handle_exception/client0/result.json b/tests/snapshots/test_app/test_ask_handle_exception/client0/result.json index 39db6d36d8..723fe960ae 100644 --- a/tests/snapshots/test_app/test_ask_handle_exception/client0/result.json +++ b/tests/snapshots/test_app/test_ask_handle_exception/client0/result.json @@ -1,3 +1,3 @@ { - "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, view the full error in the logs. See aka.ms/appservice-logs for more information.\nError type: \n" + "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, check the application logs for a full traceback.\nError type: \n" } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_ask_handle_exception/client1/result.json b/tests/snapshots/test_app/test_ask_handle_exception/client1/result.json index 39db6d36d8..723fe960ae 100644 --- a/tests/snapshots/test_app/test_ask_handle_exception/client1/result.json +++ b/tests/snapshots/test_app/test_ask_handle_exception/client1/result.json @@ -1,3 +1,3 @@ { - "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, view the full error in the logs. See aka.ms/appservice-logs for more information.\nError type: \n" + "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, check the application logs for a full traceback.\nError type: \n" } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_handle_exception/client0/result.json b/tests/snapshots/test_app/test_chat_handle_exception/client0/result.json index 39db6d36d8..723fe960ae 100644 --- a/tests/snapshots/test_app/test_chat_handle_exception/client0/result.json +++ b/tests/snapshots/test_app/test_chat_handle_exception/client0/result.json @@ -1,3 +1,3 @@ { - "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, view the full error in the logs. See aka.ms/appservice-logs for more information.\nError type: \n" + "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, check the application logs for a full traceback.\nError type: \n" } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_handle_exception/client1/result.json b/tests/snapshots/test_app/test_chat_handle_exception/client1/result.json index 39db6d36d8..723fe960ae 100644 --- a/tests/snapshots/test_app/test_chat_handle_exception/client1/result.json +++ b/tests/snapshots/test_app/test_chat_handle_exception/client1/result.json @@ -1,3 +1,3 @@ { - "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, view the full error in the logs. See aka.ms/appservice-logs for more information.\nError type: \n" + "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, check the application logs for a full traceback.\nError type: \n" } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_handle_exception_streaming/client0/result.jsonlines b/tests/snapshots/test_app/test_chat_handle_exception_streaming/client0/result.jsonlines index a7fcbeb5c8..d3a6b030ac 100644 --- a/tests/snapshots/test_app/test_chat_handle_exception_streaming/client0/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_handle_exception_streaming/client0/result.jsonlines @@ -1 +1 @@ -{"error": "The app encountered an error processing your request.\nIf you are an administrator of the app, view the full error in the logs. See aka.ms/appservice-logs for more information.\nError type: \n"} \ No newline at end of file +{"error": "The app encountered an error processing your request.\nIf you are an administrator of the app, check the application logs for a full traceback.\nError type: \n"} \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_handle_exception_streaming/client1/result.jsonlines b/tests/snapshots/test_app/test_chat_handle_exception_streaming/client1/result.jsonlines index a7fcbeb5c8..d3a6b030ac 100644 --- a/tests/snapshots/test_app/test_chat_handle_exception_streaming/client1/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_handle_exception_streaming/client1/result.jsonlines @@ -1 +1 @@ -{"error": "The app encountered an error processing your request.\nIf you are an administrator of the app, view the full error in the logs. See aka.ms/appservice-logs for more information.\nError type: \n"} \ No newline at end of file +{"error": "The app encountered an error processing your request.\nIf you are an administrator of the app, check the application logs for a full traceback.\nError type: \n"} \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_stream_handle_exception/client0/result.json b/tests/snapshots/test_app/test_chat_stream_handle_exception/client0/result.json index 39db6d36d8..723fe960ae 100644 --- a/tests/snapshots/test_app/test_chat_stream_handle_exception/client0/result.json +++ b/tests/snapshots/test_app/test_chat_stream_handle_exception/client0/result.json @@ -1,3 +1,3 @@ { - "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, view the full error in the logs. See aka.ms/appservice-logs for more information.\nError type: \n" + "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, check the application logs for a full traceback.\nError type: \n" } \ No newline at end of file diff --git a/tests/snapshots/test_app/test_chat_stream_handle_exception/client1/result.json b/tests/snapshots/test_app/test_chat_stream_handle_exception/client1/result.json index 39db6d36d8..723fe960ae 100644 --- a/tests/snapshots/test_app/test_chat_stream_handle_exception/client1/result.json +++ b/tests/snapshots/test_app/test_chat_stream_handle_exception/client1/result.json @@ -1,3 +1,3 @@ { - "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, view the full error in the logs. See aka.ms/appservice-logs for more information.\nError type: \n" + "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, check the application logs for a full traceback.\nError type: \n" } \ No newline at end of file diff --git a/tests/test_cosmosdb.py b/tests/test_cosmosdb.py index 6efc9b7f3a..457de68bea 100644 --- a/tests/test_cosmosdb.py +++ b/tests/test_cosmosdb.py @@ -190,7 +190,7 @@ async def mock_upsert_item(container_proxy, item, **kwargs): ) assert response.status_code == 500 assert (await response.get_json()) == { - "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, view the full error in the logs. See aka.ms/appservice-logs for more information.\nError type: \n" + "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, check the application logs for a full traceback.\nError type: \n" } @@ -261,7 +261,7 @@ def mock_query_items(container_proxy, query, **kwargs): ) assert response.status_code == 500 assert (await response.get_json()) == { - "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, view the full error in the logs. See aka.ms/appservice-logs for more information.\nError type: \n" + "error": "The app encountered an error processing your request.\nIf you are an administrator of the app, check the application logs for a full traceback.\nError type: \n" }