Skip to content

Commit

Permalink
Updated AudioTranscriptionServiceException class by removing construc…
Browse files Browse the repository at this point in the history
…tors in which the error message was hard coded in. Updated all relevant service files to include message.
  • Loading branch information
Lezune committed May 29, 2024
1 parent 5507463 commit e023763
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AudioTranscriptions.Exc
#pragma warning disable RCS1194 // Implement exception constructors.
public class AudioTranscriptionServiceException : Xeption
{
public AudioTranscriptionServiceException(Exception innerException)
: base(
message: "Audio transcription service error occurred, contact support.",
innerException: innerException)
{ }

public AudioTranscriptionServiceException(string message, Exception innerException)
: base(message, innerException)
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ private static async ValueTask<AudioTranscription> TryCatch(
var failedAudioTranscriptionServiceException =
new FailedAudioTranscriptionServiceException(exception);

throw new AudioTranscriptionServiceException(failedAudioTranscriptionServiceException);
throw new AudioTranscriptionServiceException(
message: "Audio transcription service error occurred, contact support.",
failedAudioTranscriptionServiceException);
}
}
}
Expand Down

0 comments on commit e023763

Please sign in to comment.