Skip to content

Commit

Permalink
improve error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshawkes committed Nov 16, 2024
1 parent b5c4bef commit 9635774
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion polytope_server/common/datasource/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def dispatch(self, request, input_data) -> bool:
pass
else:
request.user_message += "Skipping datasource: {}\n".format(
repr(e)
str(e)
)
tb = traceback.format_exception(None, e, e.__traceback__)
logging.info(tb)
Expand Down
7 changes: 4 additions & 3 deletions polytope_server/common/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ def check_released(
)
if datetime.now() < release_date:
raise PolytopeError(
f"Data not yet released for date: {date_in}, class: {c}, stream: {s}, "
f"domain: {dom}, time: {time_in}, step: {step}, type {diss}. "
f"Release time is {release_date}."
f"Data not released yet. Release time is {release_date}."
# f"Data not yet released for date: {date_in}, class: {c}, stream: {s}, "
# f"domain: {dom}, time: {time_in}, step: {step}, type {diss}. "
# f"Release time is {release_date}."
)

def get_release_time_and_delta_day(
Expand Down

0 comments on commit 9635774

Please sign in to comment.