Skip to content

Commit

Permalink
fix CI compiler cannot deal with multiline strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Asaf Cohen committed Feb 20, 2023
1 parent 983db70 commit a8a97f3
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/main/java/io/permit/sdk/api/BaseApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,23 +146,23 @@ protected void ensureContext(ApiKeyLevel callLevel) throws PermitContextError, I

// verify context matches requested call level
if (callLevel == ApiKeyLevel.PROJECT_LEVEL_API_KEY && this.config.getContext().getProject() == null) {
throw new PermitContextError("""
You're trying to use an SDK method that's specific to a project,
but you haven't set the current project in your client's context yet,
or you are using an organization level API key.
Please set the context to a specific
project using `permit.set_context()` method.
""");
throw new PermitContextError(
"You're trying to use an SDK method that's specific to a project," +
"but you haven't set the current project in your client's context yet," +
"or you are using an organization level API key." +
"Please set the context to a specific" +
"project using `permit.set_context()` method."
);
}

if (callLevel == ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY && this.config.getContext().getEnvironment() == null) {
throw new PermitContextError("""
You're trying to use an SDK method that's specific to an environment,
but you haven't set the current environment in your client's context yet,
or you are using an organization/project level API key.
Please set the context to a specific
environment using `permit.set_context()` method.
""");
throw new PermitContextError(
"You're trying to use an SDK method that's specific to an environment," +
"but you haven't set the current environment in your client's context yet," +
"or you are using an organization/project level API key." +
"Please set the context to a specific" +
"environment using `permit.set_context()` method."
);
}
}
}

0 comments on commit a8a97f3

Please sign in to comment.