Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
229beef
Updated AIFileDependencyException class to adhere to the Anemic Data …
Lezune May 28, 2024
842fd67
Updated AIFileDependencyValidationException class by removing 2nd con…
Lezune May 28, 2024
8a0e805
Updated all Service Files that throw an AIFileDependencyValidationExc…
Lezune May 28, 2024
cf4794a
Updated AIFileServiceException class by removing 2nd constructor in w…
Lezune May 28, 2024
1943d10
Updated all Service Files that throw an AIFileServiceException to inc…
Lezune May 28, 2024
17fb505
Updated AIFileValidationException class by removing 2nd constructor i…
Lezune May 28, 2024
4308537
Updated all Service Files that throw an AIFileValidationException to …
Lezune May 28, 2024
e1ac944
Updated ExcessiveCallAIFileException class by removing 2nd constructo…
Lezune May 28, 2024
7a902fb
Updated all Service Files that throw an ExcessiveCallAIFileException …
Lezune May 28, 2024
6ad444d
Updated FailedAIFileServiceException class by removing 2nd constructo…
Lezune May 28, 2024
05a1d1a
Updated FailedServerAIFileException class by removing 2nd constructor…
Lezune May 28, 2024
abcd144
Updated InvalidAIFileException class by removing constructors in whic…
Lezune May 28, 2024
e952c93
Updated InvalidConfigurationAIFileException class by removing constru…
Lezune May 28, 2024
32f85fd
Updated NotFoundAIFileException class by removing constructors in whi…
Lezune May 28, 2024
d7a54bd
Updated NullAIFileException class by removing constructors in which t…
Lezune May 28, 2024
23dade5
Updated UnauthorizedAIFileException class by removing constructors in…
Lezune May 28, 2024
4e21b66
Updated AIModelDependencyException class by removing constructors in …
Lezune May 28, 2024
98d036a
Updated AIModelDependencyValidationException class by removing constr…
Lezune May 28, 2024
d876cbf
Updated AIModelServiceException class by removing constructors in whi…
Lezune May 28, 2024
8c3333d
Updated AIModelValidationException class by removing constructors in …
Lezune May 28, 2024
a54c28c
Updated ExcessiveCallAIModelException class by removing constructors …
Lezune May 28, 2024
425b64d
Updated FailedAIModelServiceException class by removing constructors …
Lezune May 28, 2024
939f300
Updated FailedServerAIModelException class by removing constructors i…
Lezune May 28, 2024
e40fe73
Updated InvalidAIModelException class by removing constructors in whi…
Lezune May 28, 2024
cc426f0
Updated InvalidConfigurationAIModelException class by removing constr…
Lezune May 28, 2024
99462cb
Updated NotFoundAIModelException class by removing constructors in wh…
Lezune May 28, 2024
02ad0fc
Updated UnauthorizedAIModelException class by removing constructors i…
Lezune May 28, 2024
06e91dd
Updated AudioTranscriptionDependencyException class by removing const…
Lezune May 28, 2024
000a7bd
Updated AudioTranscriptionDependencyValidationException class by remo…
Lezune May 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private async Task ShouldThrowValidationExceptionOnRemoveByIdIfIdIsInvalidAsync(
string invalidFileId = invalidId;

var invalidFileException =
new InvalidAIFileException();
new InvalidAIFileException(message: "Invalid AI file error occurred, fix errors and try again.");

invalidFileException.AddData(
key: nameof(AIFile.Response.Id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ private async Task ShouldThrowValidationExceptionOnUploadIfAIFileIsNull()
{
// given
AIFile nullAIFile = null;
var nullAIFileException = new NullAIFileException();
var nullAIFileException = new NullAIFileException(message: "Ai file is null.");

var expectedAIFileValidationException =
new AIFileValidationException(
Expand Down Expand Up @@ -52,7 +52,7 @@ private async Task ShouldThrowValidationExceptionOnUploadIfAIFileRequestIsNull()
invalidAIFile.Request = null;

var invalidAIFileException =
new InvalidAIFileException();
new InvalidAIFileException(message: "Invalid AI file error occurred, fix errors and try again.");

invalidAIFileException.AddData(
key: nameof(AIFile.Request),
Expand Down Expand Up @@ -99,7 +99,7 @@ private async Task ShouldThrowValidationExceptionOnUploadIfAIFileRequestIsInvali
};

var invalidAIFileException =
new InvalidAIFileException();
new InvalidAIFileException(message: "Invalid AI file error occurred, fix errors and try again.");

invalidAIFileException.AddData(
key: nameof(AIFileRequest.Name),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private async Task ShouldThrowValidationExceptionOnRetrieveModelByNameIfModelNam
{
// given
var invalidAIModelException =
new InvalidAIModelException();
new InvalidAIModelException(message: "AI Model is invalid.");

invalidAIModelException.AddData(
key: nameof(AIModel.Name),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public static TheoryData DependencyValidationExceptions()
{
new LocalFileValidationException(someInnerException),
new LocalFileDependencyValidationException(someInnerException),
new AIFileValidationException(someInnerException),
new AIFileDependencyValidationException(someInnerException)
new AIFileValidationException(message: "AI file validation error occurred, fix errors and try again.", someInnerException),
new AIFileDependencyValidationException(message: "AI file dependency validation error occurred, contact support.", someInnerException)
};
}

Expand All @@ -59,8 +59,8 @@ public static TheoryData DependencyExceptions()
{
new LocalFileDependencyException(someInnerException),
new LocalFileServiceException(someInnerException),
new AIFileDependencyException(someInnerException),
new AIFileServiceException(someInnerException),
new AIFileDependencyException(message : "AI file dependency error occurred, contact support.", someInnerException),
new AIFileServiceException(message: "AI file service error occurred, contact support.", someInnerException),
};
}

Expand All @@ -70,8 +70,8 @@ public static TheoryData AIFileServiceDependencyExceptions()

return new TheoryData<Xeption>
{
new AIFileDependencyException(someInnerException),
new AIFileServiceException(someInnerException),
new AIFileDependencyException(message : "AI file dependency error occurred, contact support.", someInnerException),
new AIFileServiceException(message: "AI file service error occurred, contact support.", someInnerException),
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIFiles.Exceptions
{
public class AIFileDependencyException : Xeption
{
public AIFileDependencyException(Xeption innerException)
: base(
message: "AI file dependency error occurred, contact support.",
innerException: innerException)
{ }

public AIFileDependencyException(string message, Xeption innerException)
: base(message, innerException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIFiles.Exceptions
{
public class AIFileDependencyValidationException : Xeption
{
public AIFileDependencyValidationException(Xeption innerException)
: base(
message: "AI file dependency validation error occurred, contact support.",
innerException: innerException)
{ }


public AIFileDependencyValidationException(string message, Xeption innerException)
: base(message, innerException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIFiles.Exceptions
{
public class AIFileServiceException : Xeption
{
public AIFileServiceException(Xeption innerException)
: base(
message: "AI file service error occurred, contact support.",
innerException: innerException)
{ }

public AIFileServiceException(string message, Xeption innerException)
: base(message, innerException)
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIFiles.Exceptions
{
public class AIFileValidationException : Xeption
{
public AIFileValidationException(Xeption innerException)
: base(
message: "AI file validation error occurred, fix errors and try again.",
innerException: innerException)
{ }

public AIFileValidationException(string message, Xeption innerException)
: base(message, innerException) { }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIFiles.Exceptions
{
public class ExcessiveCallAIFileException : Xeption
{
public ExcessiveCallAIFileException(Exception innerException)
: base(
message: "Excessive call error occurred, limit your calls.",
innerException: innerException)
{ }

public ExcessiveCallAIFileException(string message, Exception innerException)
: base(message, innerException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIFiles.Exceptions
{
public class FailedAIFileServiceException : Xeption
{
public FailedAIFileServiceException(Exception innerException)
: base(
message: "Failed AI file service error occurred, contact support.",
innerException: innerException)
{ }

public FailedAIFileServiceException(string message, Exception innerException)
: base(message, innerException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIFiles.Exceptions
{
public class FailedServerAIFileException : Xeption
{
public FailedServerAIFileException(Exception innerException)
: base(
message: "Failed AI file server error occurred, contact support.",
innerException: innerException)
{ }

public FailedServerAIFileException(string message, Exception innerException)
: base(message, innerException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIFiles.Exceptions
{
public class InvalidAIFileException : Xeption
{
public InvalidAIFileException()
: base(
message: "Invalid AI file error occurred, fix errors and try again.")
public InvalidAIFileException(string message)
: base(message)
{ }

public InvalidAIFileException(Exception innerException)
: base(
message: "Invalid AI file error occurred, fix errors and try again.",
innerException: innerException)
{ }

public InvalidAIFileException(string message, Exception innerException)
: base(message, innerException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIFiles.Exceptions
{
public class InvalidConfigurationAIFileException : Xeption
{
public InvalidConfigurationAIFileException(Exception innerException)
: base(
message: "Invalid AI file configuration error occurred, contact support.",
innerException: innerException)
{ }

public InvalidConfigurationAIFileException(string message, Exception innerException)
: base(message, innerException)
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIFiles.Exceptions
{
public class NotFoundAIFileException : Xeption
{
public NotFoundAIFileException(Exception innerException)
: base(
message: "Not found AI file error occurred, fix errors and try again.",
innerException: innerException)
{ }

public NotFoundAIFileException(string message, Exception innerException)
: base(message: message, innerException)
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIFiles.Exceptions
{
public partial class NullAIFileException : Xeption
{
public NullAIFileException()
: base(
message: "Ai file is null.")
public NullAIFileException(String message)
: base(message)
{ }

public NullAIFileException(string message, Exception innerException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIFiles.Exceptions
{
public class UnauthorizedAIFileException : Xeption
{
public UnauthorizedAIFileException(Exception innerException)
: base(
message: "Unauthorized AI file request, fix errors and try again.",
innerException: innerException)
{ }

public UnauthorizedAIFileException(string message, Exception innerException)
: base(message, innerException) { }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIModels.Exceptions
{
internal class AIModelDependencyException : Xeption
{
public AIModelDependencyException(Xeption innerException)
: base(
message: "AI Model dependency error occurred, contact support.",
innerException: innerException)
{ }

public AIModelDependencyException(string message, Xeption innerException)
: base(message, innerException)
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIModels.Exceptions
{
internal class AIModelDependencyValidationException : Xeption
{
public AIModelDependencyValidationException(Xeption innerException)
: base(
message: "AI Model dependency validation error occurred, fix errors and try again.",
innerException: innerException)
{ }

public AIModelDependencyValidationException(string message, Xeption innerException)
: base(message: message, innerException)
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIModels.Exceptions
{
public class AIModelServiceException : Xeption
{
public AIModelServiceException(Xeption innerException)
: base(
message: "AI Model service error occurred, contact support.",
innerException: innerException)
{ }

public AIModelServiceException(string message, Xeption innerException)
: base(message, innerException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIModels.Exceptions
{
public class AIModelValidationException : Xeption
{
public AIModelValidationException(Xeption innerException)
: base(
message: "AI Model validation error occurred, fix errors and try again.",
innerException: innerException)
{ }

public AIModelValidationException(string message, Xeption innerException)
: base(message, innerException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIModels.Exceptions
{
internal class ExcessiveCallAIModelException : Xeption
{
public ExcessiveCallAIModelException(Exception innerException)
: base(
message: "Excessive call error occurred, limit your calls.",
innerException: innerException)
{ }

public ExcessiveCallAIModelException(string message, Exception innerException)
: base(message, innerException)
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIModels.Exceptions
{
public class FailedAIModelServiceException : Xeption
{
public FailedAIModelServiceException(Exception innerException)
: base(
message: "Failed AI Model Service Exception occurred, please contact support for assistance.",
innerException: innerException)
{ }

public FailedAIModelServiceException(string message, Exception innerException)
: base(message, innerException)
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIModels.Exceptions
{
public class FailedServerAIModelException : Xeption
{
public FailedServerAIModelException(Exception innerException)
: base(
message: "Failed AI Model server error occurred, contact support",
innerException: innerException)
{ }

public FailedServerAIModelException(string message, Exception innerException)
: base(message, innerException)
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIModels.Exceptions
{
public class InvalidAIModelException : Xeption
{
public InvalidAIModelException()
: base(
message: "AI Model is invalid.")
{ }

public InvalidAIModelException(Exception innerException)
: base(
message: "AI Model is invalid.",
innerException: innerException)
public InvalidAIModelException(string message)
: base(message)
{ }

public InvalidAIModelException(string message, Exception innerException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIModels.Exceptions
{
public class InvalidConfigurationAIModelException : Xeption
{
public InvalidConfigurationAIModelException(Exception innerException)
: base(
message: "Invalid AI Model configuration error occurred, contact support.",
innerException: innerException)
{ }

public InvalidConfigurationAIModelException(string message, Exception innerException)
: base(message, innerException) { }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIModels.Exceptions
{
public class NotFoundAIModelException : Xeption
{
public NotFoundAIModelException(Exception innerException)
: base(
message: "AI Model not found.",
innerException: innerException)
{ }

public NotFoundAIModelException(string message, Exception innerException)
: base(message, innerException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AIModels.Exceptions
{
public class UnauthorizedAIModelException : Xeption
{
public UnauthorizedAIModelException(Exception innerException)
: base(
message: "Unauthorized AI Model error occurred, fix errors and try again.",
innerException: innerException)
{ }

public UnauthorizedAIModelException(string message, Exception innerException)
: base(message, innerException)
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ namespace Standard.AI.OpenAI.Models.Services.Foundations.AudioTranscriptions.Exc
#pragma warning disable RCS1194 // Implement exception constructors.
public class AudioTranscriptionDependencyException : Xeption
{
public AudioTranscriptionDependencyException(Xeption innerException)
: base(
message: "Audio transcription dependency error occurred, contact support.",
innerException: innerException)
{ }

public AudioTranscriptionDependencyException(string message, Xeption innerException)
: base(message, innerException)
{ }
Expand Down
Loading