-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/フロントエンドの結合テストを実装
- Loading branch information
Showing
66 changed files
with
660 additions
and
704 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import { createApp } from 'vue'; | ||
import { createPinia } from 'pinia'; | ||
import App from './App.vue'; | ||
import { globalErrorHandler } from './shared/error-handler/global-error-handler'; | ||
|
||
const app = createApp(App); | ||
|
||
app.use(createPinia()); | ||
|
||
app.use(globalErrorHandler); | ||
|
||
app.mount('#app'); |
30 changes: 30 additions & 0 deletions
30
...es/azure-ad-b2c-sample/auth-frontend/app/src/shared/error-handler/global-error-handler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import type { App, ComponentPublicInstance } from 'vue'; | ||
|
||
export const globalErrorHandler = { | ||
/* eslint no-param-reassign: 0 */ | ||
install(app: App) { | ||
app.config.errorHandler = ( | ||
err: unknown, | ||
instance: ComponentPublicInstance | null, | ||
info: string, | ||
) => { | ||
// 本サンプルAPではコンソールへログの出力を行います。 | ||
// APの要件によってはサーバーやログ収集ツールにログを送信し、エラーを握りつぶすこともあります。 | ||
/* eslint no-console: 0 */ | ||
console.log(err, instance, info); | ||
}; | ||
|
||
// Vue.js 以外のエラー | ||
// テストやデバッグ時にエラーの発生を検知するために利用します。 | ||
window.addEventListener('error', (event) => { | ||
/* eslint no-console: 0 */ | ||
console.log(event); | ||
}); | ||
|
||
// テストやデバッグ時に予期せぬ非同期エラーの発生を検知するために利用します。 | ||
window.addEventListener('unhandledrejection', (event) => { | ||
/* eslint no-console: 0 */ | ||
console.log(event); | ||
}); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.